diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-02-01 17:09:31 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-02-01 17:09:31 -0500 |
commit | 36501650ec45b1db308c3b51886044863be2d762 (patch) | |
tree | 74cf9d9f313e510f8424f9bac35da8d61cce9f7b /drivers/ide/pci/ns87415.c | |
parent | f6fb786d6dcdd7d730e4fba620b071796f487e1b (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/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__ |