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 | ccf352894ceef79d40d015e1deee4c46c3aa42ed (patch) | |
tree | e30b2b8a4c30e2ef1719ce9780322e671ebe3c43 /drivers/ide/pci | |
parent | 7469aaf6a30f4187ed6de7c0aed5c2dd2d1c2d31 (diff) |
ide: make ide_hwif_t.ide_dma_host_on void (v2)
* since ide_hwif_t.ide_dma_host_on is called either when drive->using_dma == 1
or when return value is discarded make it void, also drop "ide_" prefix
* make __ide_dma_host_on() void and drop "__" prefix
v2:
* while at it rename atiixp_ide_dma_host_on() to atiixp_dma_host_on()
and sgiioc4_ide_dma_host_on() to sgiioc4_dma_host_on().
[ 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/sgiioc4.c | 11 |
2 files changed, 6 insertions, 11 deletions
diff --git a/drivers/ide/pci/atiixp.c b/drivers/ide/pci/atiixp.c index ed32be174200..2d48af32e3f4 100644 --- a/drivers/ide/pci/atiixp.c +++ b/drivers/ide/pci/atiixp.c | |||
@@ -101,7 +101,7 @@ static u8 atiixp_dma_2_pio(u8 xfer_rate) { | |||
101 | } | 101 | } |
102 | } | 102 | } |
103 | 103 | ||
104 | static int atiixp_ide_dma_host_on(ide_drive_t *drive) | 104 | static void atiixp_dma_host_on(ide_drive_t *drive) |
105 | { | 105 | { |
106 | struct pci_dev *dev = drive->hwif->pci_dev; | 106 | struct pci_dev *dev = drive->hwif->pci_dev; |
107 | unsigned long flags; | 107 | unsigned long flags; |
@@ -118,7 +118,7 @@ static int atiixp_ide_dma_host_on(ide_drive_t *drive) | |||
118 | 118 | ||
119 | spin_unlock_irqrestore(&atiixp_lock, flags); | 119 | spin_unlock_irqrestore(&atiixp_lock, flags); |
120 | 120 | ||
121 | return __ide_dma_host_on(drive); | 121 | ide_dma_host_on(drive); |
122 | } | 122 | } |
123 | 123 | ||
124 | static void atiixp_dma_host_off(ide_drive_t *drive) | 124 | static void atiixp_dma_host_off(ide_drive_t *drive) |
@@ -305,7 +305,7 @@ static void __devinit init_hwif_atiixp(ide_hwif_t *hwif) | |||
305 | else | 305 | else |
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->dma_host_on = &atiixp_dma_host_on; |
309 | hwif->dma_host_off = &atiixp_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) |
diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c index d9aa20012fc0..fd09b295a69d 100644 --- a/drivers/ide/pci/sgiioc4.c +++ b/drivers/ide/pci/sgiioc4.c | |||
@@ -279,7 +279,7 @@ sgiioc4_ide_dma_on(ide_drive_t * drive) | |||
279 | { | 279 | { |
280 | drive->using_dma = 1; | 280 | drive->using_dma = 1; |
281 | 281 | ||
282 | return HWIF(drive)->ide_dma_host_on(drive); | 282 | return 0; |
283 | } | 283 | } |
284 | 284 | ||
285 | static void sgiioc4_dma_off_quietly(ide_drive_t *drive) | 285 | static void sgiioc4_dma_off_quietly(ide_drive_t *drive) |
@@ -307,13 +307,8 @@ sgiioc4_ide_dma_test_irq(ide_drive_t * drive) | |||
307 | return sgiioc4_checkirq(HWIF(drive)); | 307 | return sgiioc4_checkirq(HWIF(drive)); |
308 | } | 308 | } |
309 | 309 | ||
310 | static int | 310 | static void sgiioc4_dma_host_on(ide_drive_t * drive) |
311 | sgiioc4_ide_dma_host_on(ide_drive_t * drive) | ||
312 | { | 311 | { |
313 | if (drive->using_dma) | ||
314 | return 0; | ||
315 | |||
316 | return 1; | ||
317 | } | 312 | } |
318 | 313 | ||
319 | static void sgiioc4_dma_host_off(ide_drive_t * drive) | 314 | static void sgiioc4_dma_host_off(ide_drive_t * drive) |
@@ -610,7 +605,7 @@ ide_init_sgiioc4(ide_hwif_t * hwif) | |||
610 | hwif->ide_dma_on = &sgiioc4_ide_dma_on; | 605 | hwif->ide_dma_on = &sgiioc4_ide_dma_on; |
611 | hwif->dma_off_quietly = &sgiioc4_dma_off_quietly; | 606 | hwif->dma_off_quietly = &sgiioc4_dma_off_quietly; |
612 | hwif->ide_dma_test_irq = &sgiioc4_ide_dma_test_irq; | 607 | hwif->ide_dma_test_irq = &sgiioc4_ide_dma_test_irq; |
613 | hwif->ide_dma_host_on = &sgiioc4_ide_dma_host_on; | 608 | hwif->dma_host_on = &sgiioc4_dma_host_on; |
614 | hwif->dma_host_off = &sgiioc4_dma_host_off; | 609 | hwif->dma_host_off = &sgiioc4_dma_host_off; |
615 | hwif->ide_dma_lostirq = &sgiioc4_ide_dma_lostirq; | 610 | hwif->ide_dma_lostirq = &sgiioc4_ide_dma_lostirq; |
616 | hwif->ide_dma_timeout = &__ide_dma_timeout; | 611 | hwif->ide_dma_timeout = &__ide_dma_timeout; |