diff options
Diffstat (limited to 'drivers/ide/pci/piix.c')
-rw-r--r-- | drivers/ide/pci/piix.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/ide/pci/piix.c b/drivers/ide/pci/piix.c index 70dc8792b44c..715cfd201847 100644 --- a/drivers/ide/pci/piix.c +++ b/drivers/ide/pci/piix.c | |||
@@ -71,7 +71,7 @@ static int no_piix_dma; | |||
71 | static void piix_set_pio_mode(ide_drive_t *drive, const u8 pio) | 71 | static void piix_set_pio_mode(ide_drive_t *drive, const u8 pio) |
72 | { | 72 | { |
73 | ide_hwif_t *hwif = HWIF(drive); | 73 | ide_hwif_t *hwif = HWIF(drive); |
74 | struct pci_dev *dev = hwif->pci_dev; | 74 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
75 | int is_slave = drive->dn & 1; | 75 | int is_slave = drive->dn & 1; |
76 | int master_port = hwif->channel ? 0x42 : 0x40; | 76 | int master_port = hwif->channel ? 0x42 : 0x40; |
77 | int slave_port = 0x44; | 77 | int slave_port = 0x44; |
@@ -140,7 +140,7 @@ static void piix_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
140 | static void piix_set_dma_mode(ide_drive_t *drive, const u8 speed) | 140 | static void piix_set_dma_mode(ide_drive_t *drive, const u8 speed) |
141 | { | 141 | { |
142 | ide_hwif_t *hwif = HWIF(drive); | 142 | ide_hwif_t *hwif = HWIF(drive); |
143 | struct pci_dev *dev = hwif->pci_dev; | 143 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
144 | u8 maslave = hwif->channel ? 0x42 : 0x40; | 144 | u8 maslave = hwif->channel ? 0x42 : 0x40; |
145 | int a_speed = 3 << (drive->dn * 4); | 145 | int a_speed = 3 << (drive->dn * 4); |
146 | int u_flag = 1 << drive->dn; | 146 | int u_flag = 1 << drive->dn; |
@@ -260,7 +260,7 @@ static const struct ich_laptop ich_laptop[] = { | |||
260 | 260 | ||
261 | static u8 __devinit piix_cable_detect(ide_hwif_t *hwif) | 261 | static u8 __devinit piix_cable_detect(ide_hwif_t *hwif) |
262 | { | 262 | { |
263 | struct pci_dev *pdev = hwif->pci_dev; | 263 | struct pci_dev *pdev = to_pci_dev(hwif->dev); |
264 | const struct ich_laptop *lap = &ich_laptop[0]; | 264 | const struct ich_laptop *lap = &ich_laptop[0]; |
265 | u8 reg54h = 0, mask = hwif->channel ? 0xc0 : 0x30; | 265 | u8 reg54h = 0, mask = hwif->channel ? 0xc0 : 0x30; |
266 | 266 | ||