kallsyms: cleanup: use seq_release_private() where appropriate
authorMartin Peschke <mp3@de.ibm.com>
Tue, 8 May 2007 07:29:25 +0000 (00:29 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 8 May 2007 18:15:09 +0000 (11:15 -0700)
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>
kernel/kallsyms.c

index c36581b40c04c907a2d1b88cb22b768504a03882..f1bda23140b2a60d0be17fade305d3ec3afae431 100644 (file)
@@ -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)