diff options
Diffstat (limited to 'drivers/ide/pci/sc1200.c')
-rw-r--r-- | drivers/ide/pci/sc1200.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/drivers/ide/pci/sc1200.c b/drivers/ide/pci/sc1200.c index 0c144770a8da..303bcfb2a441 100644 --- a/drivers/ide/pci/sc1200.c +++ b/drivers/ide/pci/sc1200.c | |||
@@ -165,7 +165,7 @@ static void sc1200_set_dma_mode(ide_drive_t *drive, const u8 mode) | |||
165 | * | 165 | * |
166 | * returns 1 on error, 0 otherwise | 166 | * returns 1 on error, 0 otherwise |
167 | */ | 167 | */ |
168 | static int sc1200_ide_dma_end (ide_drive_t *drive) | 168 | static int sc1200_dma_end(ide_drive_t *drive) |
169 | { | 169 | { |
170 | ide_hwif_t *hwif = HWIF(drive); | 170 | ide_hwif_t *hwif = HWIF(drive); |
171 | unsigned long dma_base = hwif->dma_base; | 171 | unsigned long dma_base = hwif->dma_base; |
@@ -214,7 +214,7 @@ static void sc1200_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
214 | printk("SC1200: %s: changing (U)DMA mode\n", drive->name); | 214 | printk("SC1200: %s: changing (U)DMA mode\n", drive->name); |
215 | ide_dma_off_quietly(drive); | 215 | ide_dma_off_quietly(drive); |
216 | if (ide_set_dma_mode(drive, mode) == 0 && drive->using_dma) | 216 | if (ide_set_dma_mode(drive, mode) == 0 && drive->using_dma) |
217 | hwif->dma_host_set(drive, 1); | 217 | hwif->dma_ops->dma_host_set(drive, 1); |
218 | return; | 218 | return; |
219 | } | 219 | } |
220 | 220 | ||
@@ -286,28 +286,20 @@ static int sc1200_resume (struct pci_dev *dev) | |||
286 | } | 286 | } |
287 | #endif | 287 | #endif |
288 | 288 | ||
289 | /* | ||
290 | * This gets invoked by the IDE driver once for each channel, | ||
291 | * and performs channel-specific pre-initialization before drive probing. | ||
292 | */ | ||
293 | static void __devinit init_hwif_sc1200 (ide_hwif_t *hwif) | ||
294 | { | ||
295 | if (hwif->dma_base == 0) | ||
296 | return; | ||
297 | |||
298 | hwif->ide_dma_end = &sc1200_ide_dma_end; | ||
299 | } | ||
300 | |||
301 | static const struct ide_port_ops sc1200_port_ops = { | 289 | static const struct ide_port_ops sc1200_port_ops = { |
302 | .set_pio_mode = sc1200_set_pio_mode, | 290 | .set_pio_mode = sc1200_set_pio_mode, |
303 | .set_dma_mode = sc1200_set_dma_mode, | 291 | .set_dma_mode = sc1200_set_dma_mode, |
304 | .udma_filter = sc1200_udma_filter, | 292 | .udma_filter = sc1200_udma_filter, |
305 | }; | 293 | }; |
306 | 294 | ||
295 | static struct ide_dma_ops sc1200_dma_ops = { | ||
296 | .dma_end = sc1200_dma_end, | ||
297 | }; | ||
298 | |||
307 | static const struct ide_port_info sc1200_chipset __devinitdata = { | 299 | static const struct ide_port_info sc1200_chipset __devinitdata = { |
308 | .name = "SC1200", | 300 | .name = "SC1200", |
309 | .init_hwif = init_hwif_sc1200, | ||
310 | .port_ops = &sc1200_port_ops, | 301 | .port_ops = &sc1200_port_ops, |
302 | .dma_ops = &sc1200_dma_ops, | ||
311 | .host_flags = IDE_HFLAG_SERIALIZE | | 303 | .host_flags = IDE_HFLAG_SERIALIZE | |
312 | IDE_HFLAG_POST_SET_MODE | | 304 | IDE_HFLAG_POST_SET_MODE | |
313 | IDE_HFLAG_ABUSE_DMA_MODES, | 305 | IDE_HFLAG_ABUSE_DMA_MODES, |