git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
kernel
/
dma.c
diff --git
a/kernel/dma.c
b/kernel/dma.c
index
940d02c
..
937b13c
100644
(file)
--- a/
kernel/dma.c
+++ b/
kernel/dma.c
@@
-38,7
+38,7
@@
*/
*/
-
spinlock_t dma_spin_lock = SPIN_LOCK_UNLOCKED
;
+
DEFINE_SPINLOCK(dma_spin_lock)
;
/*
* If our port doesn't define this it has no PC like DMA
/*
* If our port doesn't define this it has no PC like DMA
@@
-62,6
+62,11
@@
static struct dma_chan dma_chan_busy[MAX_DMA_CHANNELS] = {
};
};
+/**
+ * request_dma - request and reserve a system DMA channel
+ * @dmanr: DMA channel number
+ * @device_id: reserving device ID string, used in /proc/dma
+ */
int request_dma(unsigned int dmanr, const char * device_id)
{
if (dmanr >= MAX_DMA_CHANNELS)
int request_dma(unsigned int dmanr, const char * device_id)
{
if (dmanr >= MAX_DMA_CHANNELS)
@@
-76,7
+81,10
@@
int request_dma(unsigned int dmanr, const char * device_id)
return 0;
} /* request_dma */
return 0;
} /* request_dma */
-
+/**
+ * free_dma - free a reserved system DMA channel
+ * @dmanr: DMA channel number
+ */
void free_dma(unsigned int dmanr)
{
if (dmanr >= MAX_DMA_CHANNELS) {
void free_dma(unsigned int dmanr)
{
if (dmanr >= MAX_DMA_CHANNELS) {
@@
-132,7
+140,7
@@
static int proc_dma_open(struct inode *inode, struct file *file)
return single_open(file, proc_dma_show, NULL);
}
return single_open(file, proc_dma_show, NULL);
}
-static struct file_operations proc_dma_operations = {
+static
const
struct file_operations proc_dma_operations = {
.open = proc_dma_open,
.read = seq_read,
.llseek = seq_lseek,
.open = proc_dma_open,
.read = seq_read,
.llseek = seq_lseek,