aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_rz1000.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/pata_rz1000.c')
-rw-r--r--drivers/ata/pata_rz1000.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/ata/pata_rz1000.c b/drivers/ata/pata_rz1000.c
index 97785b4f1efa..2bfd7ef42af5 100644
--- a/drivers/ata/pata_rz1000.c
+++ b/drivers/ata/pata_rz1000.c
@@ -131,22 +131,20 @@ static int rz1000_fifo_disable(struct pci_dev *pdev)
131static int rz1000_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) 131static int rz1000_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
132{ 132{
133 static int printed_version; 133 static int printed_version;
134 struct ata_port_info *port_info[2]; 134 static const struct ata_port_info info = {
135 static struct ata_port_info info = {
136 .sht = &rz1000_sht, 135 .sht = &rz1000_sht,
137 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, 136 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
138 .pio_mask = 0x1f, 137 .pio_mask = 0x1f,
139 .port_ops = &rz1000_port_ops 138 .port_ops = &rz1000_port_ops
140 }; 139 };
140 const struct ata_port_info *ppi[] = { &info, NULL };
141 141
142 if (!printed_version++) 142 if (!printed_version++)
143 printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n"); 143 printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n");
144 144
145 if (rz1000_fifo_disable(pdev) == 0) { 145 if (rz1000_fifo_disable(pdev) == 0)
146 port_info[0] = &info; 146 return ata_pci_init_one(pdev, ppi);
147 port_info[1] = &info; 147
148 return ata_pci_init_one(pdev, port_info, 2);
149 }
150 printk(KERN_ERR DRV_NAME ": failed to disable read-ahead on chipset..\n"); 148 printk(KERN_ERR DRV_NAME ": failed to disable read-ahead on chipset..\n");
151 /* Not safe to use so skip */ 149 /* Not safe to use so skip */
152 return -ENODEV; 150 return -ENODEV;