aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/piix.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/piix.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/piix.c')
-rw-r--r--drivers/ide/pci/piix.c6
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;
71static void piix_set_pio_mode(ide_drive_t *drive, const u8 pio) 71static 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)
140static void piix_set_dma_mode(ide_drive_t *drive, const u8 speed) 140static 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
261static u8 __devinit piix_cable_detect(ide_hwif_t *hwif) 261static 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