aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_pdc202xx_old.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/pata_pdc202xx_old.c')
-rw-r--r--drivers/ata/pata_pdc202xx_old.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/ata/pata_pdc202xx_old.c b/drivers/ata/pata_pdc202xx_old.c
index 3e204c329d51..edbaf9d653b8 100644
--- a/drivers/ata/pata_pdc202xx_old.c
+++ b/drivers/ata/pata_pdc202xx_old.c
@@ -317,7 +317,7 @@ static struct ata_port_operations pdc2026x_port_ops = {
317 317
318static int pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id) 318static int pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id)
319{ 319{
320 static struct ata_port_info info[3] = { 320 static const struct ata_port_info info[3] = {
321 { 321 {
322 .sht = &pdc202xx_sht, 322 .sht = &pdc202xx_sht,
323 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, 323 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
@@ -344,9 +344,7 @@ static int pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id
344 } 344 }
345 345
346 }; 346 };
347 static struct ata_port_info *port_info[2]; 347 const struct ata_port_info *ppi[] = { &info[id->driver_data], NULL };
348
349 port_info[0] = port_info[1] = &info[id->driver_data];
350 348
351 if (dev->device == PCI_DEVICE_ID_PROMISE_20265) { 349 if (dev->device == PCI_DEVICE_ID_PROMISE_20265) {
352 struct pci_dev *bridge = dev->bus->self; 350 struct pci_dev *bridge = dev->bus->self;
@@ -358,7 +356,7 @@ static int pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id
358 return -ENODEV; 356 return -ENODEV;
359 } 357 }
360 } 358 }
361 return ata_pci_init_one(dev, port_info, 2); 359 return ata_pci_init_one(dev, ppi);
362} 360}
363 361
364static const struct pci_device_id pdc202xx[] = { 362static const struct pci_device_id pdc202xx[] = {