diff options
Diffstat (limited to 'drivers/ide/pci/ns87415.c')
-rw-r--r-- | drivers/ide/pci/ns87415.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/ide/pci/ns87415.c b/drivers/ide/pci/ns87415.c index d4df4642dbb5..bd05a4aae61b 100644 --- a/drivers/ide/pci/ns87415.c +++ b/drivers/ide/pci/ns87415.c | |||
@@ -71,10 +71,9 @@ static u8 superio_ide_inb (unsigned long port) | |||
71 | 71 | ||
72 | static void __devinit superio_ide_init_iops (struct hwif_s *hwif) | 72 | static void __devinit superio_ide_init_iops (struct hwif_s *hwif) |
73 | { | 73 | { |
74 | struct pci_dev *pdev = to_pci_dev(hwif->dev); | ||
74 | u32 base, dmabase; | 75 | u32 base, dmabase; |
75 | u8 tmp; | 76 | u8 port = hwif->channel, tmp; |
76 | struct pci_dev *pdev = hwif->pci_dev; | ||
77 | u8 port = hwif->channel; | ||
78 | 77 | ||
79 | base = pci_resource_start(pdev, port * 2) & ~3; | 78 | base = pci_resource_start(pdev, port * 2) & ~3; |
80 | dmabase = pci_resource_start(pdev, 4) & ~3; | 79 | dmabase = pci_resource_start(pdev, 4) & ~3; |
@@ -93,10 +92,11 @@ static void __devinit superio_ide_init_iops (struct hwif_s *hwif) | |||
93 | 92 | ||
94 | static void __devinit init_iops_ns87415(ide_hwif_t *hwif) | 93 | static void __devinit init_iops_ns87415(ide_hwif_t *hwif) |
95 | { | 94 | { |
96 | if (PCI_SLOT(hwif->pci_dev->devfn) == 0xE) { | 95 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
96 | |||
97 | if (PCI_SLOT(dev->devfn) == 0xE) | ||
97 | /* Built-in - assume it's under superio. */ | 98 | /* Built-in - assume it's under superio. */ |
98 | superio_ide_init_iops(hwif); | 99 | superio_ide_init_iops(hwif); |
99 | } | ||
100 | } | 100 | } |
101 | #endif | 101 | #endif |
102 | 102 | ||
@@ -110,8 +110,8 @@ static unsigned int ns87415_count = 0, ns87415_control[MAX_HWIFS] = { 0 }; | |||
110 | static void ns87415_prepare_drive (ide_drive_t *drive, unsigned int use_dma) | 110 | static void ns87415_prepare_drive (ide_drive_t *drive, unsigned int use_dma) |
111 | { | 111 | { |
112 | ide_hwif_t *hwif = HWIF(drive); | 112 | ide_hwif_t *hwif = HWIF(drive); |
113 | struct pci_dev *dev = to_pci_dev(hwif->dev); | ||
113 | unsigned int bit, other, new, *old = (unsigned int *) hwif->select_data; | 114 | unsigned int bit, other, new, *old = (unsigned int *) hwif->select_data; |
114 | struct pci_dev *dev = hwif->pci_dev; | ||
115 | unsigned long flags; | 115 | unsigned long flags; |
116 | 116 | ||
117 | local_irq_save(flags); | 117 | local_irq_save(flags); |
@@ -189,7 +189,7 @@ static int ns87415_ide_dma_setup(ide_drive_t *drive) | |||
189 | 189 | ||
190 | static void __devinit init_hwif_ns87415 (ide_hwif_t *hwif) | 190 | static void __devinit init_hwif_ns87415 (ide_hwif_t *hwif) |
191 | { | 191 | { |
192 | struct pci_dev *dev = hwif->pci_dev; | 192 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
193 | unsigned int ctrl, using_inta; | 193 | unsigned int ctrl, using_inta; |
194 | u8 progif; | 194 | u8 progif; |
195 | #ifdef __sparc_v9__ | 195 | #ifdef __sparc_v9__ |