diff options
-rw-r--r-- | drivers/ide/pci/hpt366.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c index 29a377044323..4968b16fa307 100644 --- a/drivers/ide/pci/hpt366.c +++ b/drivers/ide/pci/hpt366.c | |||
@@ -72,6 +72,8 @@ | |||
72 | * table in which the mode lookup is done | 72 | * table in which the mode lookup is done |
73 | * - fix the hotswap code: it caused RESET- to glitch when tristating the bus, | 73 | * - fix the hotswap code: it caused RESET- to glitch when tristating the bus, |
74 | * and for HPT36x the obsolete HDIO_TRISTATE_HWIF handler was called instead | 74 | * and for HPT36x the obsolete HDIO_TRISTATE_HWIF handler was called instead |
75 | * - pass to init_chipset() handlers a copy of the IDE PCI device structure as | ||
76 | * they tamper with its fields | ||
75 | * <source@mvista.com> | 77 | * <source@mvista.com> |
76 | * | 78 | * |
77 | */ | 79 | */ |
@@ -1564,13 +1566,16 @@ static ide_pci_device_t hpt366_chipsets[] __devinitdata = { | |||
1564 | * | 1566 | * |
1565 | * Called when the PCI registration layer (or the IDE initialization) | 1567 | * Called when the PCI registration layer (or the IDE initialization) |
1566 | * finds a device matching our IDE device tables. | 1568 | * finds a device matching our IDE device tables. |
1569 | * | ||
1570 | * NOTE: since we'll have to modify some fields of the ide_pci_device_t | ||
1571 | * structure depending on the chip's revision, we'd better pass a local | ||
1572 | * copy down the call chain... | ||
1567 | */ | 1573 | */ |
1568 | |||
1569 | static int __devinit hpt366_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 1574 | static int __devinit hpt366_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
1570 | { | 1575 | { |
1571 | ide_pci_device_t *d = &hpt366_chipsets[id->driver_data]; | 1576 | ide_pci_device_t d = hpt366_chipsets[id->driver_data]; |
1572 | 1577 | ||
1573 | return d->init_setup(dev, d); | 1578 | return d.init_setup(dev, &d); |
1574 | } | 1579 | } |
1575 | 1580 | ||
1576 | static struct pci_device_id hpt366_pci_tbl[] = { | 1581 | static struct pci_device_id hpt366_pci_tbl[] = { |