]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ata/pata_rz1000.c
[NIU]: Fix link LED handling.
[linux-2.6-omap-h63xx.git] / drivers / ata / pata_rz1000.c
index 97785b4f1efaf49986468c6413e4a57a28a4eaad..ba8a31c55edb5fef3ab9a856fc395932b2ae7847 100644 (file)
 #include <linux/libata.h>
 
 #define DRV_NAME       "pata_rz1000"
-#define DRV_VERSION    "0.2.3"
+#define DRV_VERSION    "0.2.4"
 
 
 /**
  *     rz1000_set_mode         -       mode setting function
- *     @ap: ATA interface
+ *     @link: ATA link
  *     @unused: returned device on set_mode failure
  *
  *     Use a non standard set_mode function. We don't want to be tuned. We
  *     whacked out.
  */
 
-static int rz1000_set_mode(struct ata_port *ap, struct ata_device **unused)
+static int rz1000_set_mode(struct ata_link *link, struct ata_device **unused)
 {
-       int i;
+       struct ata_device *dev;
 
-       for (i = 0; i < ATA_MAX_DEVICES; i++) {
-               struct ata_device *dev = &ap->device[i];
+       ata_link_for_each_dev(dev, link) {
                if (ata_dev_enabled(dev)) {
                        /* We don't really care */
                        dev->pio_mode = XFER_PIO_0;
@@ -74,7 +73,6 @@ static struct scsi_host_template rz1000_sht = {
 static struct ata_port_operations rz1000_port_ops = {
        .set_mode       = rz1000_set_mode,
 
-       .port_disable   = ata_port_disable,
        .tf_load        = ata_tf_load,
        .tf_read        = ata_tf_read,
        .check_status   = ata_check_status,
@@ -100,9 +98,8 @@ static struct ata_port_operations rz1000_port_ops = {
        .irq_handler    = ata_interrupt,
        .irq_clear      = ata_bmdma_irq_clear,
        .irq_on         = ata_irq_on,
-       .irq_ack        = ata_irq_ack,
 
-       .port_start     = ata_port_start,
+       .port_start     = ata_sff_port_start,
 };
 
 static int rz1000_fifo_disable(struct pci_dev *pdev)
@@ -131,22 +128,20 @@ static int rz1000_fifo_disable(struct pci_dev *pdev)
 static int rz1000_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
 {
        static int printed_version;
-       struct ata_port_info *port_info[2];
-       static struct ata_port_info info = {
+       static const struct ata_port_info info = {
                .sht = &rz1000_sht,
-               .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
+               .flags = ATA_FLAG_SLAVE_POSS,
                .pio_mask = 0x1f,
                .port_ops = &rz1000_port_ops
        };
+       const struct ata_port_info *ppi[] = { &info, NULL };
 
        if (!printed_version++)
                printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n");
 
-       if (rz1000_fifo_disable(pdev) == 0) {
-               port_info[0] = &info;
-               port_info[1] = &info;
-               return ata_pci_init_one(pdev, port_info, 2);
-       }
+       if (rz1000_fifo_disable(pdev) == 0)
+               return ata_pci_init_one(pdev, ppi);
+
        printk(KERN_ERR DRV_NAME ": failed to disable read-ahead on chipset..\n");
        /* Not safe to use so skip */
        return -ENODEV;