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/sc1200.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/sc1200.c')
-rw-r--r-- | drivers/ide/pci/sc1200.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/ide/pci/sc1200.c b/drivers/ide/pci/sc1200.c index 32fdf53379f5..c2eac1c69ae8 100644 --- a/drivers/ide/pci/sc1200.c +++ b/drivers/ide/pci/sc1200.c | |||
@@ -87,7 +87,7 @@ static const unsigned int sc1200_pio_timings[4][5] = | |||
87 | static void sc1200_tunepio(ide_drive_t *drive, u8 pio) | 87 | static void sc1200_tunepio(ide_drive_t *drive, u8 pio) |
88 | { | 88 | { |
89 | ide_hwif_t *hwif = drive->hwif; | 89 | ide_hwif_t *hwif = drive->hwif; |
90 | struct pci_dev *pdev = hwif->pci_dev; | 90 | struct pci_dev *pdev = to_pci_dev(hwif->dev); |
91 | unsigned int basereg = hwif->channel ? 0x50 : 0x40, format = 0; | 91 | unsigned int basereg = hwif->channel ? 0x50 : 0x40, format = 0; |
92 | 92 | ||
93 | pci_read_config_dword(pdev, basereg + 4, &format); | 93 | pci_read_config_dword(pdev, basereg + 4, &format); |
@@ -130,6 +130,7 @@ out: | |||
130 | static void sc1200_set_dma_mode(ide_drive_t *drive, const u8 mode) | 130 | static void sc1200_set_dma_mode(ide_drive_t *drive, const u8 mode) |
131 | { | 131 | { |
132 | ide_hwif_t *hwif = HWIF(drive); | 132 | ide_hwif_t *hwif = HWIF(drive); |
133 | struct pci_dev *dev = to_pci_dev(hwif->dev); | ||
133 | int unit = drive->select.b.unit; | 134 | int unit = drive->select.b.unit; |
134 | unsigned int reg, timings; | 135 | unsigned int reg, timings; |
135 | unsigned short pci_clock; | 136 | unsigned short pci_clock; |
@@ -160,12 +161,11 @@ static void sc1200_set_dma_mode(ide_drive_t *drive, const u8 mode) | |||
160 | timings = mwdma_timing[pci_clock][mode - XFER_MW_DMA_0]; | 161 | timings = mwdma_timing[pci_clock][mode - XFER_MW_DMA_0]; |
161 | 162 | ||
162 | if (unit == 0) { /* are we configuring drive0? */ | 163 | if (unit == 0) { /* are we configuring drive0? */ |
163 | pci_read_config_dword(hwif->pci_dev, basereg+4, ®); | 164 | pci_read_config_dword(dev, basereg + 4, ®); |
164 | timings |= reg & 0x80000000; /* preserve PIO format bit */ | 165 | timings |= reg & 0x80000000; /* preserve PIO format bit */ |
165 | pci_write_config_dword(hwif->pci_dev, basereg+4, timings); | 166 | pci_write_config_dword(dev, basereg + 4, timings); |
166 | } else { | 167 | } else |
167 | pci_write_config_dword(hwif->pci_dev, basereg+12, timings); | 168 | pci_write_config_dword(dev, basereg + 12, timings); |
168 | } | ||
169 | } | 169 | } |
170 | 170 | ||
171 | /* Replacement for the standard ide_dma_end action in | 171 | /* Replacement for the standard ide_dma_end action in |