Commit 5a0c6a0d1ae97473291f479ef64573d6b2c0e2d5

Authored by Martin Peschke
Committed by Linus Torvalds
1 parent 6272e26679

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>

Showing 1 changed file with 1 additions and 8 deletions Side-by-side Diff

... ... @@ -470,18 +470,11 @@
470 470 return ret;
471 471 }
472 472  
473   -static 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   -
480 473 static const struct file_operations kallsyms_operations = {
481 474 .open = kallsyms_open,
482 475 .read = seq_read,
483 476 .llseek = seq_lseek,
484   - .release = kallsyms_release,
  477 + .release = seq_release_private,
485 478 };
486 479  
487 480 static int __init kallsyms_init(void)