aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Peschke <mp3@de.ibm.com>2007-05-08 03:29:25 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 14:15:09 -0400
commit5a0c6a0d1ae97473291f479ef64573d6b2c0e2d5 (patch)
tree39f3d1716c2136da8c53c220b0ea21d93695693a
parent6272e2667965dfb5b59199f462cd0f001fb304a6 (diff)
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>
-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)
470 return ret; 470 return ret;
471} 471}
472 472
473static int kallsyms_release(struct inode *inode, struct file *file)
474{
475 struct seq_file *m = (struct seq_file *)file->private_data;
476 kfree(m->private);
477 return seq_release(inode, file);
478}
479
480static const struct file_operations kallsyms_operations = { 473static const struct file_operations kallsyms_operations = {
481 .open = kallsyms_open, 474 .open = kallsyms_open,
482 .read = seq_read, 475 .read = seq_read,
483 .llseek = seq_lseek, 476 .llseek = seq_lseek,
484 .release = kallsyms_release, 477 .release = seq_release_private,
485}; 478};
486 479
487static int __init kallsyms_init(void) 480static int __init kallsyms_init(void)