aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_hpt3x2n.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/pata_hpt3x2n.c')
-rw-r--r--drivers/ata/pata_hpt3x2n.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/ata/pata_hpt3x2n.c b/drivers/ata/pata_hpt3x2n.c
index 2c178c30116c..c774be93ae04 100644
--- a/drivers/ata/pata_hpt3x2n.c
+++ b/drivers/ata/pata_hpt3x2n.c
@@ -458,8 +458,7 @@ static int hpt3x2n_init_one(struct pci_dev *dev, const struct pci_device_id *id)
458 .udma_mask = ATA_UDMA6, 458 .udma_mask = ATA_UDMA6,
459 .port_ops = &hpt3x2n_port_ops 459 .port_ops = &hpt3x2n_port_ops
460 }; 460 };
461 struct ata_port_info port = info; 461 const struct ata_port_info *ppi[] = { &info, NULL };
462 const struct ata_port_info *ppi[] = { &port, NULL };
463 462
464 u8 irqmask; 463 u8 irqmask;
465 u32 class_rev; 464 u32 class_rev;
@@ -468,6 +467,7 @@ static int hpt3x2n_init_one(struct pci_dev *dev, const struct pci_device_id *id)
468 unsigned int f_low, f_high; 467 unsigned int f_low, f_high;
469 int adjust; 468 int adjust;
470 unsigned long iobase = pci_resource_start(dev, 4); 469 unsigned long iobase = pci_resource_start(dev, 4);
470 void *hpriv = NULL;
471 int rc; 471 int rc;
472 472
473 rc = pcim_enable_device(dev); 473 rc = pcim_enable_device(dev);
@@ -554,9 +554,8 @@ static int hpt3x2n_init_one(struct pci_dev *dev, const struct pci_device_id *id)
554 pci_mhz); 554 pci_mhz);
555 /* Set our private data up. We only need a few flags so we use 555 /* Set our private data up. We only need a few flags so we use
556 it directly */ 556 it directly */
557 port.private_data = NULL;
558 if (pci_mhz > 60) { 557 if (pci_mhz > 60) {
559 port.private_data = (void *)PCI66; 558 hpriv = (void *)PCI66;
560 /* 559 /*
561 * On HPT371N, if ATA clock is 66 MHz we must set bit 2 in 560 * On HPT371N, if ATA clock is 66 MHz we must set bit 2 in
562 * the MISC. register to stretch the UltraDMA Tss timing. 561 * the MISC. register to stretch the UltraDMA Tss timing.
@@ -567,7 +566,7 @@ static int hpt3x2n_init_one(struct pci_dev *dev, const struct pci_device_id *id)
567 } 566 }
568 567
569 /* Now kick off ATA set up */ 568 /* Now kick off ATA set up */
570 return ata_pci_init_one(dev, ppi, &hpt3x2n_sht); 569 return ata_pci_init_one(dev, ppi, &hpt3x2n_sht, hpriv);
571} 570}
572 571
573static const struct pci_device_id hpt3x2n[] = { 572static const struct pci_device_id hpt3x2n[] = {