diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-02-16 20:40:26 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-02-16 20:40:26 -0500 |
commit | 7469aaf6a30f4187ed6de7c0aed5c2dd2d1c2d31 (patch) | |
tree | 079930f23b3d14e4ad29ab972bc6d91fde52e5f0 /drivers/ide/pci | |
parent | 3608b5d71a52c053787dbad6af20c25f7e0b75a9 (diff) |
ide: make ide_hwif_t.ide_dma_{host_off,off_quietly} void (v2)
* since ide_hwif_t.ide_dma_{host_off,off_quietly} always return '0'
make these functions void and while at it drop "ide_" prefix
* fix comment for __ide_dma_off_quietly()
* make __ide_dma_{host_off,off_quietly,off}() void and drop "__" prefix
v2:
* while at it rename atiixp_ide_dma_host_off() to atiixp_dma_host_off(),
sgiioc4_ide_dma_{host_off,off_quietly}() to sgiioc4_dma_{host_off,off_quietly}()
and sl82c105_ide_dma_off_quietly() to sl82c105_dma_off_quietly()
[ Noticed by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ]
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci')
-rw-r--r-- | drivers/ide/pci/atiixp.c | 6 | ||||
-rw-r--r-- | drivers/ide/pci/cs5530.c | 2 | ||||
-rw-r--r-- | drivers/ide/pci/it821x.c | 2 | ||||
-rw-r--r-- | drivers/ide/pci/sc1200.c | 6 | ||||
-rw-r--r-- | drivers/ide/pci/sgiioc4.c | 14 | ||||
-rw-r--r-- | drivers/ide/pci/sl82c105.c | 13 |
6 files changed, 18 insertions, 25 deletions
diff --git a/drivers/ide/pci/atiixp.c b/drivers/ide/pci/atiixp.c index e7b4415adc83..ed32be174200 100644 --- a/drivers/ide/pci/atiixp.c +++ b/drivers/ide/pci/atiixp.c | |||
@@ -121,7 +121,7 @@ static int atiixp_ide_dma_host_on(ide_drive_t *drive) | |||
121 | return __ide_dma_host_on(drive); | 121 | return __ide_dma_host_on(drive); |
122 | } | 122 | } |
123 | 123 | ||
124 | static int atiixp_ide_dma_host_off(ide_drive_t *drive) | 124 | static void atiixp_dma_host_off(ide_drive_t *drive) |
125 | { | 125 | { |
126 | struct pci_dev *dev = drive->hwif->pci_dev; | 126 | struct pci_dev *dev = drive->hwif->pci_dev; |
127 | unsigned long flags; | 127 | unsigned long flags; |
@@ -135,7 +135,7 @@ static int atiixp_ide_dma_host_off(ide_drive_t *drive) | |||
135 | 135 | ||
136 | spin_unlock_irqrestore(&atiixp_lock, flags); | 136 | spin_unlock_irqrestore(&atiixp_lock, flags); |
137 | 137 | ||
138 | return __ide_dma_host_off(drive); | 138 | ide_dma_host_off(drive); |
139 | } | 139 | } |
140 | 140 | ||
141 | /** | 141 | /** |
@@ -306,7 +306,7 @@ static void __devinit init_hwif_atiixp(ide_hwif_t *hwif) | |||
306 | hwif->udma_four = 0; | 306 | hwif->udma_four = 0; |
307 | 307 | ||
308 | hwif->ide_dma_host_on = &atiixp_ide_dma_host_on; | 308 | hwif->ide_dma_host_on = &atiixp_ide_dma_host_on; |
309 | hwif->ide_dma_host_off = &atiixp_ide_dma_host_off; | 309 | hwif->dma_host_off = &atiixp_dma_host_off; |
310 | hwif->ide_dma_check = &atiixp_dma_check; | 310 | hwif->ide_dma_check = &atiixp_dma_check; |
311 | if (!noautodma) | 311 | if (!noautodma) |
312 | hwif->autodma = 1; | 312 | hwif->autodma = 1; |
diff --git a/drivers/ide/pci/cs5530.c b/drivers/ide/pci/cs5530.c index ff909cfb96b6..b2d7c132ef4b 100644 --- a/drivers/ide/pci/cs5530.c +++ b/drivers/ide/pci/cs5530.c | |||
@@ -109,7 +109,7 @@ static int cs5530_config_dma (ide_drive_t *drive) | |||
109 | /* | 109 | /* |
110 | * Default to DMA-off in case we run into trouble here. | 110 | * Default to DMA-off in case we run into trouble here. |
111 | */ | 111 | */ |
112 | hwif->ide_dma_off_quietly(drive); | 112 | hwif->dma_off_quietly(drive); |
113 | 113 | ||
114 | /* | 114 | /* |
115 | * The CS5530 specifies that two drives sharing a cable cannot | 115 | * The CS5530 specifies that two drives sharing a cable cannot |
diff --git a/drivers/ide/pci/it821x.c b/drivers/ide/pci/it821x.c index 35ee17df3f8d..a132767f7d90 100644 --- a/drivers/ide/pci/it821x.c +++ b/drivers/ide/pci/it821x.c | |||
@@ -606,7 +606,7 @@ static void __devinit it821x_fixups(ide_hwif_t *hwif) | |||
606 | printk(".\n"); | 606 | printk(".\n"); |
607 | /* Now the core code will have wrongly decided no DMA | 607 | /* Now the core code will have wrongly decided no DMA |
608 | so we need to fix this */ | 608 | so we need to fix this */ |
609 | hwif->ide_dma_off_quietly(drive); | 609 | hwif->dma_off_quietly(drive); |
610 | #ifdef CONFIG_IDEDMA_ONLYDISK | 610 | #ifdef CONFIG_IDEDMA_ONLYDISK |
611 | if (drive->media == ide_disk) | 611 | if (drive->media == ide_disk) |
612 | #endif | 612 | #endif |
diff --git a/drivers/ide/pci/sc1200.c b/drivers/ide/pci/sc1200.c index 08e317f281e7..b5ae0c50e216 100644 --- a/drivers/ide/pci/sc1200.c +++ b/drivers/ide/pci/sc1200.c | |||
@@ -161,7 +161,7 @@ static int sc1200_config_dma2 (ide_drive_t *drive, int mode) | |||
161 | /* | 161 | /* |
162 | * Default to DMA-off in case we run into trouble here. | 162 | * Default to DMA-off in case we run into trouble here. |
163 | */ | 163 | */ |
164 | hwif->ide_dma_off_quietly(drive); /* turn off DMA while we fiddle */ | 164 | hwif->dma_off_quietly(drive); /* turn off DMA while we fiddle */ |
165 | outb(inb(hwif->dma_base+2)&~(unit?0x40:0x20), hwif->dma_base+2); /* clear DMA_capable bit */ | 165 | outb(inb(hwif->dma_base+2)&~(unit?0x40:0x20), hwif->dma_base+2); /* clear DMA_capable bit */ |
166 | 166 | ||
167 | /* | 167 | /* |
@@ -439,10 +439,10 @@ static int sc1200_resume (struct pci_dev *dev) | |||
439 | ide_drive_t *drive = &(hwif->drives[d]); | 439 | ide_drive_t *drive = &(hwif->drives[d]); |
440 | if (drive->present && !__ide_dma_bad_drive(drive)) { | 440 | if (drive->present && !__ide_dma_bad_drive(drive)) { |
441 | int was_using_dma = drive->using_dma; | 441 | int was_using_dma = drive->using_dma; |
442 | hwif->ide_dma_off_quietly(drive); | 442 | hwif->dma_off_quietly(drive); |
443 | sc1200_config_dma(drive); | 443 | sc1200_config_dma(drive); |
444 | if (!was_using_dma && drive->using_dma) { | 444 | if (!was_using_dma && drive->using_dma) { |
445 | hwif->ide_dma_off_quietly(drive); | 445 | hwif->dma_off_quietly(drive); |
446 | } | 446 | } |
447 | } | 447 | } |
448 | } | 448 | } |
diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c index cb5c3211bd8e..d9aa20012fc0 100644 --- a/drivers/ide/pci/sgiioc4.c +++ b/drivers/ide/pci/sgiioc4.c | |||
@@ -282,12 +282,11 @@ sgiioc4_ide_dma_on(ide_drive_t * drive) | |||
282 | return HWIF(drive)->ide_dma_host_on(drive); | 282 | return HWIF(drive)->ide_dma_host_on(drive); |
283 | } | 283 | } |
284 | 284 | ||
285 | static int | 285 | static void sgiioc4_dma_off_quietly(ide_drive_t *drive) |
286 | sgiioc4_ide_dma_off_quietly(ide_drive_t * drive) | ||
287 | { | 286 | { |
288 | drive->using_dma = 0; | 287 | drive->using_dma = 0; |
289 | 288 | ||
290 | return HWIF(drive)->ide_dma_host_off(drive); | 289 | drive->hwif->dma_host_off(drive); |
291 | } | 290 | } |
292 | 291 | ||
293 | static int sgiioc4_ide_dma_check(ide_drive_t *drive) | 292 | static int sgiioc4_ide_dma_check(ide_drive_t *drive) |
@@ -317,12 +316,9 @@ sgiioc4_ide_dma_host_on(ide_drive_t * drive) | |||
317 | return 1; | 316 | return 1; |
318 | } | 317 | } |
319 | 318 | ||
320 | static int | 319 | static void sgiioc4_dma_host_off(ide_drive_t * drive) |
321 | sgiioc4_ide_dma_host_off(ide_drive_t * drive) | ||
322 | { | 320 | { |
323 | sgiioc4_clearirq(drive); | 321 | sgiioc4_clearirq(drive); |
324 | |||
325 | return 0; | ||
326 | } | 322 | } |
327 | 323 | ||
328 | static int | 324 | static int |
@@ -612,10 +608,10 @@ ide_init_sgiioc4(ide_hwif_t * hwif) | |||
612 | hwif->ide_dma_end = &sgiioc4_ide_dma_end; | 608 | hwif->ide_dma_end = &sgiioc4_ide_dma_end; |
613 | hwif->ide_dma_check = &sgiioc4_ide_dma_check; | 609 | hwif->ide_dma_check = &sgiioc4_ide_dma_check; |
614 | hwif->ide_dma_on = &sgiioc4_ide_dma_on; | 610 | hwif->ide_dma_on = &sgiioc4_ide_dma_on; |
615 | hwif->ide_dma_off_quietly = &sgiioc4_ide_dma_off_quietly; | 611 | hwif->dma_off_quietly = &sgiioc4_dma_off_quietly; |
616 | hwif->ide_dma_test_irq = &sgiioc4_ide_dma_test_irq; | 612 | hwif->ide_dma_test_irq = &sgiioc4_ide_dma_test_irq; |
617 | hwif->ide_dma_host_on = &sgiioc4_ide_dma_host_on; | 613 | hwif->ide_dma_host_on = &sgiioc4_ide_dma_host_on; |
618 | hwif->ide_dma_host_off = &sgiioc4_ide_dma_host_off; | 614 | hwif->dma_host_off = &sgiioc4_dma_host_off; |
619 | hwif->ide_dma_lostirq = &sgiioc4_ide_dma_lostirq; | 615 | hwif->ide_dma_lostirq = &sgiioc4_ide_dma_lostirq; |
620 | hwif->ide_dma_timeout = &__ide_dma_timeout; | 616 | hwif->ide_dma_timeout = &__ide_dma_timeout; |
621 | 617 | ||
diff --git a/drivers/ide/pci/sl82c105.c b/drivers/ide/pci/sl82c105.c index 27b21e120260..3a8a76fc78c7 100644 --- a/drivers/ide/pci/sl82c105.c +++ b/drivers/ide/pci/sl82c105.c | |||
@@ -265,19 +265,16 @@ static int sl82c105_ide_dma_on (ide_drive_t *drive) | |||
265 | return __ide_dma_on(drive); | 265 | return __ide_dma_on(drive); |
266 | } | 266 | } |
267 | 267 | ||
268 | static int sl82c105_ide_dma_off_quietly (ide_drive_t *drive) | 268 | static void sl82c105_dma_off_quietly(ide_drive_t *drive) |
269 | { | 269 | { |
270 | u8 speed = XFER_PIO_0; | 270 | u8 speed = XFER_PIO_0; |
271 | int rc; | ||
272 | |||
273 | DBG(("sl82c105_ide_dma_off_quietly(drive:%s)\n", drive->name)); | ||
274 | 271 | ||
275 | rc = __ide_dma_off_quietly(drive); | 272 | DBG(("sl82c105_dma_off_quietly(drive:%s)\n", drive->name)); |
273 | |||
274 | ide_dma_off_quietly(drive); | ||
276 | if (drive->pio_speed) | 275 | if (drive->pio_speed) |
277 | speed = drive->pio_speed - XFER_PIO_0; | 276 | speed = drive->pio_speed - XFER_PIO_0; |
278 | config_for_pio(drive, speed, 0, 1); | 277 | config_for_pio(drive, speed, 0, 1); |
279 | |||
280 | return rc; | ||
281 | } | 278 | } |
282 | 279 | ||
283 | /* | 280 | /* |
@@ -440,7 +437,7 @@ static void __devinit init_hwif_sl82c105(ide_hwif_t *hwif) | |||
440 | 437 | ||
441 | hwif->ide_dma_check = &sl82c105_check_drive; | 438 | hwif->ide_dma_check = &sl82c105_check_drive; |
442 | hwif->ide_dma_on = &sl82c105_ide_dma_on; | 439 | hwif->ide_dma_on = &sl82c105_ide_dma_on; |
443 | hwif->ide_dma_off_quietly = &sl82c105_ide_dma_off_quietly; | 440 | hwif->dma_off_quietly = &sl82c105_dma_off_quietly; |
444 | hwif->ide_dma_lostirq = &sl82c105_ide_dma_lost_irq; | 441 | hwif->ide_dma_lostirq = &sl82c105_ide_dma_lost_irq; |
445 | hwif->dma_start = &sl82c105_ide_dma_start; | 442 | hwif->dma_start = &sl82c105_ide_dma_start; |
446 | hwif->ide_dma_timeout = &sl82c105_ide_dma_timeout; | 443 | hwif->ide_dma_timeout = &sl82c105_ide_dma_timeout; |