提交 5a0c6a0d 编写于 作者: M Martin Peschke 提交者: Linus Torvalds

kallsyms: cleanup: use seq_release_private() where appropriate

We can save some lines of code by using seq_release_private().
Signed-off-by: NMartin Peschke <mp3@de.ibm.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 6272e266
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册