aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/atiixp.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-02-01 17:09:31 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-02-01 17:09:31 -0500
commit36501650ec45b1db308c3b51886044863be2d762 (patch)
tree74cf9d9f313e510f8424f9bac35da8d61cce9f7b /drivers/ide/pci/atiixp.c
parentf6fb786d6dcdd7d730e4fba620b071796f487e1b (diff)
ide: keep pointer to struct device instead of struct pci_dev in ide_hwif_t
Keep pointer to struct device instead of struct pci_dev in ide_hwif_t. While on it: * Use *dev->dma_mask instead of pci_dev->dma_mask in ide_toggle_bounce(). There should be no functionality changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
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;