summaryrefslogtreecommitdiff
path: root/kernel/kallsyms.c
diff options
context:
space:
mode:
authorMartin Peschke <mp3@de.ibm.com>2007-05-08 11:29:25 +0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 22:15:09 +0400
commit5a0c6a0d1ae97473291f479ef64573d6b2c0e2d5 (patch)
tree39f3d1716c2136da8c53c220b0ea21d93695693a /kernel/kallsyms.c
parent6272e2667965dfb5b59199f462cd0f001fb304a6 (diff)
downloadlinux-5a0c6a0d1ae97473291f479ef64573d6b2c0e2d5.tar.xz
kallsyms: cleanup: use seq_release_private() where appropriate
We can save some lines of code by using seq_release_private(). Signed-off-by: Martin Peschke <mp3@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/kallsyms.c')
-rw-r--r--kernel/kallsyms.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c
index c36581b40c04..f1bda23140b2 100644
--- a/kernel/kallsyms.c
+++ b/kernel/kallsyms.c
@@ -470,18 +470,11 @@ static int kallsyms_open(struct inode *inode, struct file *file)
return ret;
}
-static int kallsyms_release(struct inode *inode, struct file *file)
-{
- struct seq_file *m = (struct seq_file *)file->private_data;
- kfree(m->private);
- return seq_release(inode, file);
-}
-
static const struct file_operations kallsyms_operations = {
.open = kallsyms_open,
.read = seq_read,
.llseek = seq_lseek,
- .release = kallsyms_release,
+ .release = seq_release_private,
};
static int __init kallsyms_init(void)