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.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/ata/pata_hpt3x2n.c b/drivers/ata/pata_hpt3x2n.c
index ea1037d67860..f25154aed75d 100644
--- a/drivers/ata/pata_hpt3x2n.c
+++ b/drivers/ata/pata_hpt3x2n.c
@@ -488,7 +488,7 @@ static int hpt3x2n_pci_clock(struct pci_dev *pdev)
488static int hpt3x2n_init_one(struct pci_dev *dev, const struct pci_device_id *id) 488static int hpt3x2n_init_one(struct pci_dev *dev, const struct pci_device_id *id)
489{ 489{
490 /* HPT372N and friends - UDMA133 */ 490 /* HPT372N and friends - UDMA133 */
491 static struct ata_port_info info = { 491 static const struct ata_port_info info = {
492 .sht = &hpt3x2n_sht, 492 .sht = &hpt3x2n_sht,
493 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, 493 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
494 .pio_mask = 0x1f, 494 .pio_mask = 0x1f,
@@ -496,8 +496,8 @@ static int hpt3x2n_init_one(struct pci_dev *dev, const struct pci_device_id *id)
496 .udma_mask = 0x7f, 496 .udma_mask = 0x7f,
497 .port_ops = &hpt3x2n_port_ops 497 .port_ops = &hpt3x2n_port_ops
498 }; 498 };
499 struct ata_port_info *port_info[2]; 499 struct ata_port_info port = info;
500 struct ata_port_info *port = &info; 500 const struct ata_port_info *ppi[] = { &port, NULL };
501 501
502 u8 irqmask; 502 u8 irqmask;
503 u32 class_rev; 503 u32 class_rev;
@@ -585,9 +585,9 @@ static int hpt3x2n_init_one(struct pci_dev *dev, const struct pci_device_id *id)
585 585
586 /* Set our private data up. We only need a few flags so we use 586 /* Set our private data up. We only need a few flags so we use
587 it directly */ 587 it directly */
588 port->private_data = NULL; 588 port.private_data = NULL;
589 if (pci_mhz > 60) { 589 if (pci_mhz > 60) {
590 port->private_data = (void *)PCI66; 590 port.private_data = (void *)PCI66;
591 /* 591 /*
592 * On HPT371N, if ATA clock is 66 MHz we must set bit 2 in 592 * On HPT371N, if ATA clock is 66 MHz we must set bit 2 in
593 * the MISC. register to stretch the UltraDMA Tss timing. 593 * the MISC. register to stretch the UltraDMA Tss timing.
@@ -598,8 +598,7 @@ static int hpt3x2n_init_one(struct pci_dev *dev, const struct pci_device_id *id)
598 } 598 }
599 599
600 /* Now kick off ATA set up */ 600 /* Now kick off ATA set up */
601 port_info[0] = port_info[1] = port; 601 return ata_pci_init_one(dev, ppi);
602 return ata_pci_init_one(dev, port_info, 2);
603} 602}
604 603
605static const struct pci_device_id hpt3x2n[] = { 604static const struct pci_device_id hpt3x2n[] = {