aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2009-08-17 04:54:03 -0400
committerIngo Molnar <mingo@elte.hu>2009-08-17 05:25:10 -0400
commit3be04b471b95b870bd129a138463756629e86f3f (patch)
tree056a6f2ecf5be83c0441ebe9357f16bc1f91cd0c
parent2fc5f0cff4cf1c4cd336d0f61f11bca6eeee1d84 (diff)
ftrace: Simplify seqfile code
Use seq_release_private(). Signed-off-by: Li 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: Ingo Molnar <mingo@elte.hu>
-rw-r--r--kernel/trace/ftrace.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 094863416b2e..1993b7186cdb 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -1556,17 +1556,6 @@ ftrace_avail_open(struct inode *inode, struct file *file)
1556 return ret; 1556 return ret;
1557} 1557}
1558 1558
1559int ftrace_avail_release(struct inode *inode, struct file *file)
1560{
1561 struct seq_file *m = (struct seq_file *)file->private_data;
1562 struct ftrace_iterator *iter = m->private;
1563
1564 seq_release(inode, file);
1565 kfree(iter);
1566
1567 return 0;
1568}
1569
1570static int 1559static int
1571ftrace_failures_open(struct inode *inode, struct file *file) 1560ftrace_failures_open(struct inode *inode, struct file *file)
1572{ 1561{
@@ -2427,14 +2416,14 @@ static const struct file_operations ftrace_avail_fops = {
2427 .open = ftrace_avail_open, 2416 .open = ftrace_avail_open,
2428 .read = seq_read, 2417 .read = seq_read,
2429 .llseek = seq_lseek, 2418 .llseek = seq_lseek,
2430 .release = ftrace_avail_release, 2419 .release = seq_release_private,
2431}; 2420};
2432 2421
2433static const struct file_operations ftrace_failures_fops = { 2422static const struct file_operations ftrace_failures_fops = {
2434 .open = ftrace_failures_open, 2423 .open = ftrace_failures_open,
2435 .read = seq_read, 2424 .read = seq_read,
2436 .llseek = seq_lseek, 2425 .llseek = seq_lseek,
2437 .release = ftrace_avail_release, 2426 .release = seq_release_private,
2438}; 2427};
2439 2428
2440static const struct file_operations ftrace_filter_fops = { 2429static const struct file_operations ftrace_filter_fops = {