aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/via82cxxx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/via82cxxx.c')
-rw-r--r--drivers/ide/pci/via82cxxx.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c
index 4b32c90f4896..24cb9047fb41 100644
--- a/drivers/ide/pci/via82cxxx.c
+++ b/drivers/ide/pci/via82cxxx.c
@@ -1,7 +1,4 @@
1/* 1/*
2 *
3 * Version 3.50
4 *
5 * VIA IDE driver for Linux. Supported southbridges: 2 * VIA IDE driver for Linux. Supported southbridges:
6 * 3 *
7 * vt82c576, vt82c586, vt82c586a, vt82c586b, vt82c596a, vt82c596b, 4 * vt82c576, vt82c586, vt82c586a, vt82c586b, vt82c596a, vt82c596b,
@@ -121,8 +118,8 @@ struct via82cxxx_dev
121 118
122static void via_set_speed(ide_hwif_t *hwif, u8 dn, struct ide_timing *timing) 119static void via_set_speed(ide_hwif_t *hwif, u8 dn, struct ide_timing *timing)
123{ 120{
124 struct pci_dev *dev = hwif->pci_dev; 121 struct pci_dev *dev = to_pci_dev(hwif->dev);
125 struct via82cxxx_dev *vdev = pci_get_drvdata(hwif->pci_dev); 122 struct via82cxxx_dev *vdev = pci_get_drvdata(dev);
126 u8 t; 123 u8 t;
127 124
128 if (~vdev->via_config->flags & VIA_BAD_AST) { 125 if (~vdev->via_config->flags & VIA_BAD_AST) {
@@ -159,8 +156,10 @@ static void via_set_speed(ide_hwif_t *hwif, u8 dn, struct ide_timing *timing)
159 156
160static void via_set_drive(ide_drive_t *drive, const u8 speed) 157static void via_set_drive(ide_drive_t *drive, const u8 speed)
161{ 158{
162 ide_drive_t *peer = HWIF(drive)->drives + (~drive->dn & 1); 159 ide_hwif_t *hwif = drive->hwif;
163 struct via82cxxx_dev *vdev = pci_get_drvdata(drive->hwif->pci_dev); 160 ide_drive_t *peer = hwif->drives + (~drive->dn & 1);
161 struct pci_dev *dev = to_pci_dev(hwif->dev);
162 struct via82cxxx_dev *vdev = pci_get_drvdata(dev);
164 struct ide_timing t, p; 163 struct ide_timing t, p;
165 unsigned int T, UT; 164 unsigned int T, UT;
166 165
@@ -408,7 +407,7 @@ static int via_cable_override(struct pci_dev *pdev)
408 407
409static u8 __devinit via82cxxx_cable_detect(ide_hwif_t *hwif) 408static u8 __devinit via82cxxx_cable_detect(ide_hwif_t *hwif)
410{ 409{
411 struct pci_dev *pdev = hwif->pci_dev; 410 struct pci_dev *pdev = to_pci_dev(hwif->dev);
412 struct via82cxxx_dev *vdev = pci_get_drvdata(pdev); 411 struct via82cxxx_dev *vdev = pci_get_drvdata(pdev);
413 412
414 if (via_cable_override(pdev)) 413 if (via_cable_override(pdev))