summaryrefslogtreecommitdiff
path: root/kernel/dma.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-01-19 05:14:37 -0800
committerLinus Torvalds <torvalds@home.osdl.org>2004-01-19 05:14:37 -0800
commit489a867c51086cadf495bc6aa0839ef090fa740f (patch)
treef6acda8b2f8c288c10789bc4366dc475d9c921a6 /kernel/dma.c
parentefe067fac0fcd767a4dbe3c52d7548d43499c5c4 (diff)
[PATCH] cleanup single_open usage in dma.c
From: Jeff Muizelaar <muizelaar@rogers.com> The attached patch lets the seq_file api take care of buffer allocation instead of doing it by hand.
Diffstat (limited to 'kernel/dma.c')
-rw-r--r--kernel/dma.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/kernel/dma.c b/kernel/dma.c
index 7ad7fbf83a83..af1d982a0c57 100644
--- a/kernel/dma.c
+++ b/kernel/dma.c
@@ -136,20 +136,7 @@ static int proc_dma_show(struct seq_file *m, void *v)
static int proc_dma_open(struct inode *inode, struct file *file)
{
- char *buf = kmalloc(PAGE_SIZE, GFP_KERNEL);
- struct seq_file *m;
- int res;
-
- if (!buf)
- return -ENOMEM;
- res = single_open(file, proc_dma_show, NULL);
- if (!res) {
- m = file->private_data;
- m->buf = buf;
- m->size = PAGE_SIZE;
- } else
- kfree(buf);
- return res;
+ return single_open(file, proc_dma_show, NULL);
}
static struct file_operations proc_dma_operations = {