git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sched: Introduce a function to update the idle statistics
[safe/jmp/linux-2.6]
/
kernel
/
dma.c
diff --git
a/kernel/dma.c
b/kernel/dma.c
index
2020644
..
f903189
100644
(file)
--- a/
kernel/dma.c
+++ b/
kernel/dma.c
@@
-1,4
+1,4
@@
-/*
$Id: dma.c,v 1.7 1994/12/28 03:35:33 root Exp root $
+/*
* linux/kernel/dma.c: A DMA channel allocator. Inspired by linux/kernel/irq.c.
*
* Written by Hennus Bergman, 1992.
* linux/kernel/dma.c: A DMA channel allocator. Inspired by linux/kernel/irq.c.
*
* Written by Hennus Bergman, 1992.
@@
-20,7
+20,7
@@
#include <asm/dma.h>
#include <asm/system.h>
#include <asm/dma.h>
#include <asm/system.h>
-
+
/* A note on resource allocation:
*
/* A note on resource allocation:
*
@@
-95,7
+95,7
@@
void free_dma(unsigned int dmanr)
if (xchg(&dma_chan_busy[dmanr].lock, 0) == 0) {
printk(KERN_WARNING "Trying to free free DMA%d\n", dmanr);
return;
if (xchg(&dma_chan_busy[dmanr].lock, 0) == 0) {
printk(KERN_WARNING "Trying to free free DMA%d\n", dmanr);
return;
- }
+ }
} /* free_dma */
} /* free_dma */
@@
-121,8
+121,8
@@
static int proc_dma_show(struct seq_file *m, void *v)
for (i = 0 ; i < MAX_DMA_CHANNELS ; i++) {
if (dma_chan_busy[i].lock) {
for (i = 0 ; i < MAX_DMA_CHANNELS ; i++) {
if (dma_chan_busy[i].lock) {
- seq_printf(m, "%2d: %s\n", i,
- dma_chan_busy[i].device_id);
+
seq_printf(m, "%2d: %s\n", i,
+
dma_chan_busy[i].device_id);
}
}
return 0;
}
}
return 0;
@@
-140,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,
@@
-149,12
+149,7
@@
static struct file_operations proc_dma_operations = {
static int __init proc_dma_init(void)
{
static int __init proc_dma_init(void)
{
- struct proc_dir_entry *e;
-
- e = create_proc_entry("dma", 0, NULL);
- if (e)
- e->proc_fops = &proc_dma_operations;
-
+ proc_create("dma", 0, NULL, &proc_dma_operations);
return 0;
}
return 0;
}