aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/aec62xx.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/aec62xx.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/aec62xx.c')
-rw-r--r--drivers/ide/pci/aec62xx.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/ide/pci/aec62xx.c b/drivers/ide/pci/aec62xx.c
index 15597597740f..28401701b8d0 100644
--- a/drivers/ide/pci/aec62xx.c
+++ b/drivers/ide/pci/aec62xx.c
@@ -90,7 +90,7 @@ static u8 pci_bus_clock_list_ultra (u8 speed, struct chipset_bus_clock_list_entr
90static void aec6210_set_mode(ide_drive_t *drive, const u8 speed) 90static void aec6210_set_mode(ide_drive_t *drive, const u8 speed)
91{ 91{
92 ide_hwif_t *hwif = HWIF(drive); 92 ide_hwif_t *hwif = HWIF(drive);
93 struct pci_dev *dev = hwif->pci_dev; 93 struct pci_dev *dev = to_pci_dev(hwif->dev);
94 u16 d_conf = 0; 94 u16 d_conf = 0;
95 u8 ultra = 0, ultra_conf = 0; 95 u8 ultra = 0, ultra_conf = 0;
96 u8 tmp0 = 0, tmp1 = 0, tmp2 = 0; 96 u8 tmp0 = 0, tmp1 = 0, tmp2 = 0;
@@ -116,7 +116,7 @@ static void aec6210_set_mode(ide_drive_t *drive, const u8 speed)
116static void aec6260_set_mode(ide_drive_t *drive, const u8 speed) 116static void aec6260_set_mode(ide_drive_t *drive, const u8 speed)
117{ 117{
118 ide_hwif_t *hwif = HWIF(drive); 118 ide_hwif_t *hwif = HWIF(drive);
119 struct pci_dev *dev = hwif->pci_dev; 119 struct pci_dev *dev = to_pci_dev(hwif->dev);
120 u8 unit = (drive->select.b.unit & 0x01); 120 u8 unit = (drive->select.b.unit & 0x01);
121 u8 tmp1 = 0, tmp2 = 0; 121 u8 tmp1 = 0, tmp2 = 0;
122 u8 ultra = 0, drive_conf = 0, ultra_conf = 0; 122 u8 ultra = 0, drive_conf = 0, ultra_conf = 0;
@@ -170,7 +170,7 @@ static unsigned int __devinit init_chipset_aec62xx(struct pci_dev *dev, const ch
170 170
171static void __devinit init_hwif_aec62xx(ide_hwif_t *hwif) 171static void __devinit init_hwif_aec62xx(ide_hwif_t *hwif)
172{ 172{
173 struct pci_dev *dev = hwif->pci_dev; 173 struct pci_dev *dev = to_pci_dev(hwif->dev);
174 174
175 hwif->set_pio_mode = &aec_set_pio_mode; 175 hwif->set_pio_mode = &aec_set_pio_mode;
176 176
@@ -188,7 +188,7 @@ static void __devinit init_hwif_aec62xx(ide_hwif_t *hwif)
188 if (hwif->cbl != ATA_CBL_PATA40_SHORT) { 188 if (hwif->cbl != ATA_CBL_PATA40_SHORT) {
189 u8 ata66 = 0, mask = hwif->channel ? 0x02 : 0x01; 189 u8 ata66 = 0, mask = hwif->channel ? 0x02 : 0x01;
190 190
191 pci_read_config_byte(hwif->pci_dev, 0x49, &ata66); 191 pci_read_config_byte(dev, 0x49, &ata66);
192 192
193 hwif->cbl = (ata66 & mask) ? ATA_CBL_PATA40 : ATA_CBL_PATA80; 193 hwif->cbl = (ata66 & mask) ? ATA_CBL_PATA40 : ATA_CBL_PATA80;
194 } 194 }