aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/atiixp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/atiixp.c')
-rw-r--r--drivers/ide/pci/atiixp.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/ide/pci/atiixp.c b/drivers/ide/pci/atiixp.c
index 491871984aaa..ab856d3583e1 100644
--- a/drivers/ide/pci/atiixp.c
+++ b/drivers/ide/pci/atiixp.c
@@ -55,7 +55,7 @@ static DEFINE_SPINLOCK(atiixp_lock);
55 55
56static void atiixp_set_pio_mode(ide_drive_t *drive, const u8 pio) 56static void atiixp_set_pio_mode(ide_drive_t *drive, const u8 pio)
57{ 57{
58 struct pci_dev *dev = drive->hwif->pci_dev; 58 struct pci_dev *dev = to_pci_dev(drive->hwif->dev);
59 unsigned long flags; 59 unsigned long flags;
60 int timing_shift = (drive->dn & 2) ? 16 : 0 + (drive->dn & 1) ? 0 : 8; 60 int timing_shift = (drive->dn & 2) ? 16 : 0 + (drive->dn & 1) ? 0 : 8;
61 u32 pio_timing_data; 61 u32 pio_timing_data;
@@ -88,7 +88,7 @@ static void atiixp_set_pio_mode(ide_drive_t *drive, const u8 pio)
88 88
89static void atiixp_set_dma_mode(ide_drive_t *drive, const u8 speed) 89static void atiixp_set_dma_mode(ide_drive_t *drive, const u8 speed)
90{ 90{
91 struct pci_dev *dev = drive->hwif->pci_dev; 91 struct pci_dev *dev = to_pci_dev(drive->hwif->dev);
92 unsigned long flags; 92 unsigned long flags;
93 int timing_shift = (drive->dn & 2) ? 16 : 0 + (drive->dn & 1) ? 0 : 8; 93 int timing_shift = (drive->dn & 2) ? 16 : 0 + (drive->dn & 1) ? 0 : 8;
94 u32 tmp32; 94 u32 tmp32;
@@ -133,9 +133,8 @@ static void atiixp_set_dma_mode(ide_drive_t *drive, const u8 speed)
133 133
134static void __devinit init_hwif_atiixp(ide_hwif_t *hwif) 134static void __devinit init_hwif_atiixp(ide_hwif_t *hwif)
135{ 135{
136 u8 udma_mode = 0; 136 struct pci_dev *pdev = to_pci_dev(hwif->dev);
137 u8 ch = hwif->channel; 137 u8 udma_mode = 0, ch = hwif->channel;
138 struct pci_dev *pdev = hwif->pci_dev;
139 138
140 hwif->set_pio_mode = &atiixp_set_pio_mode; 139 hwif->set_pio_mode = &atiixp_set_pio_mode;
141 hwif->set_dma_mode = &atiixp_set_dma_mode; 140 hwif->set_dma_mode = &atiixp_set_dma_mode;