aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/via82cxxx.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/via82cxxx.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/via82cxxx.c')
-rw-r--r--drivers/ide/pci/via82cxxx.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c
index 4b32c90f4896..37de25b16b34 100644
--- a/drivers/ide/pci/via82cxxx.c
+++ b/drivers/ide/pci/via82cxxx.c
@@ -121,8 +121,8 @@ struct via82cxxx_dev
121 121
122static void via_set_speed(ide_hwif_t *hwif, u8 dn, struct ide_timing *timing) 122static void via_set_speed(ide_hwif_t *hwif, u8 dn, struct ide_timing *timing)
123{ 123{
124 struct pci_dev *dev = hwif->pci_dev; 124 struct pci_dev *dev = to_pci_dev(hwif->dev);
125 struct via82cxxx_dev *vdev = pci_get_drvdata(hwif->pci_dev); 125 struct via82cxxx_dev *vdev = pci_get_drvdata(dev);
126 u8 t; 126 u8 t;
127 127
128 if (~vdev->via_config->flags & VIA_BAD_AST) { 128 if (~vdev->via_config->flags & VIA_BAD_AST) {
@@ -159,8 +159,10 @@ static void via_set_speed(ide_hwif_t *hwif, u8 dn, struct ide_timing *timing)
159 159
160static void via_set_drive(ide_drive_t *drive, const u8 speed) 160static void via_set_drive(ide_drive_t *drive, const u8 speed)
161{ 161{
162 ide_drive_t *peer = HWIF(drive)->drives + (~drive->dn & 1); 162 ide_hwif_t *hwif = drive->hwif;
163 struct via82cxxx_dev *vdev = pci_get_drvdata(drive->hwif->pci_dev); 163 ide_drive_t *peer = hwif->drives + (~drive->dn & 1);
164 struct pci_dev *dev = to_pci_dev(hwif->dev);
165 struct via82cxxx_dev *vdev = pci_get_drvdata(dev);
164 struct ide_timing t, p; 166 struct ide_timing t, p;
165 unsigned int T, UT; 167 unsigned int T, UT;
166 168
@@ -408,7 +410,7 @@ static int via_cable_override(struct pci_dev *pdev)
408 410
409static u8 __devinit via82cxxx_cable_detect(ide_hwif_t *hwif) 411static u8 __devinit via82cxxx_cable_detect(ide_hwif_t *hwif)
410{ 412{
411 struct pci_dev *pdev = hwif->pci_dev; 413 struct pci_dev *pdev = to_pci_dev(hwif->dev);
412 struct via82cxxx_dev *vdev = pci_get_drvdata(pdev); 414 struct via82cxxx_dev *vdev = pci_get_drvdata(pdev);
413 415
414 if (via_cable_override(pdev)) 416 if (via_cable_override(pdev))