Commit 3be04b47 authored by Li Zefan's avatar Li Zefan Committed by Ingo Molnar

ftrace: Simplify seqfile code

Use seq_release_private().
Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
LKML-Reference: <4A891AAB.8090701@cn.fujitsu.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 2fc5f0cf
...@@ -1556,17 +1556,6 @@ ftrace_avail_open(struct inode *inode, struct file *file) ...@@ -1556,17 +1556,6 @@ ftrace_avail_open(struct inode *inode, struct file *file)
return ret; return ret;
} }
int ftrace_avail_release(struct inode *inode, struct file *file)
{
struct seq_file *m = (struct seq_file *)file->private_data;
struct ftrace_iterator *iter = m->private;
seq_release(inode, file);
kfree(iter);
return 0;
}
static int static int
ftrace_failures_open(struct inode *inode, struct file *file) ftrace_failures_open(struct inode *inode, struct file *file)
{ {
...@@ -2427,14 +2416,14 @@ static const struct file_operations ftrace_avail_fops = { ...@@ -2427,14 +2416,14 @@ static const struct file_operations ftrace_avail_fops = {
.open = ftrace_avail_open, .open = ftrace_avail_open,
.read = seq_read, .read = seq_read,
.llseek = seq_lseek, .llseek = seq_lseek,
.release = ftrace_avail_release, .release = seq_release_private,
}; };
static const struct file_operations ftrace_failures_fops = { static const struct file_operations ftrace_failures_fops = {
.open = ftrace_failures_open, .open = ftrace_failures_open,
.read = seq_read, .read = seq_read,
.llseek = seq_lseek, .llseek = seq_lseek,
.release = ftrace_avail_release, .release = seq_release_private,
}; };
static const struct file_operations ftrace_filter_fops = { static const struct file_operations ftrace_filter_fops = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment