[PATCH] IDE update [10/10]

From: Bartlomiej Zolnierkiewicz
Date: Tue Jun 01 2004 - 17:38:50 EST



[PATCH] ide: simplify CONFIG_IDEDMA_ONLYDISK logic a bit

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@xxxxxxxxxxxxxx>

linux-2.6.7-rc2-bk2-bzolnier/drivers/ide/ide-probe.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)

diff -puN drivers/ide/ide-probe.c~idedma_onlydisk drivers/ide/ide-probe.c
--- linux-2.6.7-rc2-bk2/drivers/ide/ide-probe.c~idedma_onlydisk 2004-06-01 20:03:50.409834424 +0200
+++ linux-2.6.7-rc2-bk2-bzolnier/drivers/ide/ide-probe.c 2004-06-01 20:03:50.417833208 +0200
@@ -800,18 +800,12 @@ void probe_hwif (ide_hwif_t *hwif)

for (unit = 0; unit < MAX_DRIVES; ++unit) {
ide_drive_t *drive = &hwif->drives[unit];
- int enable_dma = 1;

if (drive->present) {
if (hwif->tuneproc != NULL &&
drive->autotune == IDE_TUNE_AUTO)
/* auto-tune PIO mode */
hwif->tuneproc(drive, 255);
-
-#ifdef CONFIG_IDEDMA_ONLYDISK
- if (drive->media != ide_disk)
- enable_dma = 0;
-#endif
/*
* MAJOR HACK BARF :-/
*
@@ -831,7 +825,9 @@ void probe_hwif (ide_hwif_t *hwif)
* PARANOIA!!!
*/
hwif->ide_dma_off_quietly(drive);
- if (enable_dma)
+#ifdef CONFIG_IDEDMA_ONLYDISK
+ if (drive->media == ide_disk)
+#endif
hwif->ide_dma_check(drive);
}
}

_

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/