diff options
Diffstat (limited to 'drivers/ide/pci/alim15x3.c')
-rw-r--r-- | drivers/ide/pci/alim15x3.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c index 0b65a2c9308f..88148404d918 100644 --- a/drivers/ide/pci/alim15x3.c +++ b/drivers/ide/pci/alim15x3.c | |||
@@ -293,7 +293,7 @@ static int ali_get_info (char *buffer, char **addr, off_t offset, int count) | |||
293 | static void ali_set_pio_mode(ide_drive_t *drive, const u8 pio) | 293 | static void ali_set_pio_mode(ide_drive_t *drive, const u8 pio) |
294 | { | 294 | { |
295 | ide_hwif_t *hwif = HWIF(drive); | 295 | ide_hwif_t *hwif = HWIF(drive); |
296 | struct pci_dev *dev = hwif->pci_dev; | 296 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
297 | int s_time, a_time, c_time; | 297 | int s_time, a_time, c_time; |
298 | u8 s_clc, a_clc, r_clc; | 298 | u8 s_clc, a_clc, r_clc; |
299 | unsigned long flags; | 299 | unsigned long flags; |
@@ -396,7 +396,7 @@ static u8 ali_udma_filter(ide_drive_t *drive) | |||
396 | static void ali_set_dma_mode(ide_drive_t *drive, const u8 speed) | 396 | static void ali_set_dma_mode(ide_drive_t *drive, const u8 speed) |
397 | { | 397 | { |
398 | ide_hwif_t *hwif = HWIF(drive); | 398 | ide_hwif_t *hwif = HWIF(drive); |
399 | struct pci_dev *dev = hwif->pci_dev; | 399 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
400 | u8 speed1 = speed; | 400 | u8 speed1 = speed; |
401 | u8 unit = (drive->select.b.unit & 0x01); | 401 | u8 unit = (drive->select.b.unit & 0x01); |
402 | u8 tmpbyte = 0x00; | 402 | u8 tmpbyte = 0x00; |
@@ -625,7 +625,7 @@ static int ali_cable_override(struct pci_dev *pdev) | |||
625 | 625 | ||
626 | static u8 __devinit ata66_ali15x3(ide_hwif_t *hwif) | 626 | static u8 __devinit ata66_ali15x3(ide_hwif_t *hwif) |
627 | { | 627 | { |
628 | struct pci_dev *dev = hwif->pci_dev; | 628 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
629 | unsigned long flags; | 629 | unsigned long flags; |
630 | u8 cbl = ATA_CBL_PATA40, tmpbyte; | 630 | u8 cbl = ATA_CBL_PATA40, tmpbyte; |
631 | 631 | ||
@@ -688,12 +688,13 @@ static void __devinit init_hwif_common_ali15x3 (ide_hwif_t *hwif) | |||
688 | 688 | ||
689 | static void __devinit init_hwif_ali15x3 (ide_hwif_t *hwif) | 689 | static void __devinit init_hwif_ali15x3 (ide_hwif_t *hwif) |
690 | { | 690 | { |
691 | struct pci_dev *dev = to_pci_dev(hwif->dev); | ||
691 | u8 ideic, inmir; | 692 | u8 ideic, inmir; |
692 | s8 irq_routing_table[] = { -1, 9, 3, 10, 4, 5, 7, 6, | 693 | s8 irq_routing_table[] = { -1, 9, 3, 10, 4, 5, 7, 6, |
693 | 1, 11, 0, 12, 0, 14, 0, 15 }; | 694 | 1, 11, 0, 12, 0, 14, 0, 15 }; |
694 | int irq = -1; | 695 | int irq = -1; |
695 | 696 | ||
696 | if (hwif->pci_dev->device == PCI_DEVICE_ID_AL_M5229) | 697 | if (dev->device == PCI_DEVICE_ID_AL_M5229) |
697 | hwif->irq = hwif->channel ? 15 : 14; | 698 | hwif->irq = hwif->channel ? 15 : 14; |
698 | 699 | ||
699 | if (isa_dev) { | 700 | if (isa_dev) { |