libata: set NODEV_HINT for 0x7f status
[safe/jmp/linux-2.6] / drivers / ata / pata_platform.c
index 0588c9b..d8d743a 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Based on pata_pcmcia:
  *
- *   Copyright 2005-2006 Red Hat Inc <alan@redhat.com>, all rights reserved.
+ *   Copyright 2005-2006 Red Hat Inc, all rights reserved.
  *
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
@@ -34,14 +34,12 @@ static int pata_platform_set_mode(struct ata_link *link, struct ata_device **unu
 {
        struct ata_device *dev;
 
-       ata_link_for_each_dev(dev, link) {
-               if (ata_dev_enabled(dev)) {
-                       /* We don't really care */
-                       dev->pio_mode = dev->xfer_mode = XFER_PIO_0;
-                       dev->xfer_shift = ATA_SHIFT_PIO;
-                       dev->flags |= ATA_DFLAG_PIO;
-                       ata_dev_printk(dev, KERN_INFO, "configured for PIO\n");
-               }
+       ata_for_each_dev(dev, link, ENABLED) {
+               /* We don't really care */
+               dev->pio_mode = dev->xfer_mode = XFER_PIO_0;
+               dev->xfer_shift = ATA_SHIFT_PIO;
+               dev->flags |= ATA_DFLAG_PIO;
+               ata_dev_printk(dev, KERN_INFO, "configured for PIO\n");
        }
        return 0;
 }
@@ -52,7 +50,7 @@ static struct scsi_host_template pata_platform_sht = {
 
 static struct ata_port_operations pata_platform_port_ops = {
        .inherits               = &ata_sff_port_ops,
-       .data_xfer              = ata_data_xfer_noirq,
+       .sff_data_xfer          = ata_sff_data_xfer_noirq,
        .cable_detect           = ata_cable_unknown,
        .set_mode               = pata_platform_set_mode,
        .port_start             = ATA_OP_NULL,
@@ -176,7 +174,7 @@ int __devinit __pata_platform_probe(struct device *dev,
                      (unsigned long long)ctl_res->start);
 
        /* activate */
-       return ata_host_activate(host, irq, irq ? ata_interrupt : NULL,
+       return ata_host_activate(host, irq, irq ? ata_sff_interrupt : NULL,
                                 irq_flags, &pata_platform_sht);
 }
 EXPORT_SYMBOL_GPL(__pata_platform_probe);
@@ -188,7 +186,7 @@ EXPORT_SYMBOL_GPL(__pata_platform_probe);
  *     A platform bus ATA device has been unplugged. Perform the needed
  *     cleanup. Also called on module unload for any active devices.
  */
-int __devexit __pata_platform_remove(struct device *dev)
+int __pata_platform_remove(struct device *dev)
 {
        struct ata_host *host = dev_get_drvdata(dev);
 
@@ -277,3 +275,4 @@ MODULE_AUTHOR("Paul Mundt");
 MODULE_DESCRIPTION("low-level driver for platform device ATA");
 MODULE_LICENSE("GPL");
 MODULE_VERSION(DRV_VERSION);
+MODULE_ALIAS("platform:" DRV_NAME);