patch-2.3.41 linux/kernel/dma.c

Next file: linux/kernel/exit.c
Previous file: linux/ipc/shm.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.40/linux/kernel/dma.c linux/kernel/dma.c
@@ -16,6 +16,7 @@
 #include <asm/dma.h>
 #include <asm/system.h>
 
+ 
 
 /* A note on resource allocation:
  *
@@ -35,6 +36,12 @@
 
 spinlock_t dma_spin_lock = SPIN_LOCK_UNLOCKED;
 
+/*
+ *	If our port doesn't define this it has no PC like DMA
+ */
+
+#ifdef MAX_DMA_CHANNELS
+
 
 /* Channel n is busy iff dma_chan_busy[n].lock != 0.
  * DMA0 used to be reserved for DRAM refresh, but apparently not any more...
@@ -100,3 +107,22 @@
 	}	
 
 } /* free_dma */
+
+#else
+
+int request_dma(unsigned int dmanr, const char *device_id)
+{
+	return -EINVAL;
+}
+
+int free_dma(unsigned int dmanr)
+{
+	return -EINVAL;
+}
+
+int get_dma_list(char *buf)
+{	
+	strcpy(buf, "No DMA\n");
+	return 7;
+}
+#endif

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