patch-2.3.99-pre3 linux/drivers/ide/cy82c693.c

Next file: linux/drivers/ide/dtc2278.c
Previous file: linux/drivers/ide/cs5530.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre2/linux/drivers/ide/cy82c693.c linux/drivers/ide/cy82c693.c
@@ -1,5 +1,5 @@
 /*
- * linux/drivers/block/cy82c693.c		Version 0.34	Dec. 13, 1999
+ * linux/drivers/ide/cy82c693.c		Version 0.34	Dec. 13, 1999
  *
  *  Copyright (C) 1998-99 Andreas S. Krebs (akrebs@altavista.net), Maintainer
  *  Copyright (C) 1998-99 Andre Hedrick, Integrater
@@ -44,6 +44,7 @@
  *
  */
 
+#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/pci.h>
 #include <linux/delay.h>
@@ -176,6 +177,7 @@
 	p_pclk->time_8 = (byte)clk1;
 }
 
+#ifdef CONFIG_BLK_DEV_IDEDMA
 /*
  * set DMA mode a specific channel for CY82C693
  */
@@ -262,6 +264,7 @@
 	}
         return ide_dmaproc(func, drive);
 }
+#endif /* CONFIG_BLK_DEV_IDEDMA */
 
 /*
  * tune ide drive - set PIO mode
@@ -432,10 +435,14 @@
 {
 	hwif->chipset = ide_cy82c693;
 	hwif->tuneproc = &cy82c693_tune_drive;
+	hwif->drives[0].autotune = 1;
+	hwif->drives[1].autotune = 1;
+	hwif->autodma = 0;
+
+#ifdef CONFIG_BLK_DEV_IDEDMA
 	if (hwif->dma_base) {
 		hwif->dmaproc = &cy82c693_dmaproc;
-	} else {
-		hwif->drives[0].autotune = 1;
-		hwif->drives[1].autotune = 1;
+		hwif->autodma = 1;
 	}
+#endif /* CONFIG_BLK_DEV_IDEDMA */
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)