|
@@ -2053,25 +2053,23 @@ static int tracing_open(struct inode *inode, struct file *file)
|
|
static void *
|
|
static void *
|
|
t_next(struct seq_file *m, void *v, loff_t *pos)
|
|
t_next(struct seq_file *m, void *v, loff_t *pos)
|
|
{
|
|
{
|
|
- struct tracer *t = m->private;
|
|
|
|
|
|
+ struct tracer *t = v;
|
|
|
|
|
|
(*pos)++;
|
|
(*pos)++;
|
|
|
|
|
|
if (t)
|
|
if (t)
|
|
t = t->next;
|
|
t = t->next;
|
|
|
|
|
|
- m->private = t;
|
|
|
|
-
|
|
|
|
return t;
|
|
return t;
|
|
}
|
|
}
|
|
|
|
|
|
static void *t_start(struct seq_file *m, loff_t *pos)
|
|
static void *t_start(struct seq_file *m, loff_t *pos)
|
|
{
|
|
{
|
|
- struct tracer *t = m->private;
|
|
|
|
|
|
+ struct tracer *t;
|
|
loff_t l = 0;
|
|
loff_t l = 0;
|
|
|
|
|
|
mutex_lock(&trace_types_lock);
|
|
mutex_lock(&trace_types_lock);
|
|
- for (; t && l < *pos; t = t_next(m, t, &l))
|
|
|
|
|
|
+ for (t = trace_types; t && l < *pos; t = t_next(m, t, &l))
|
|
;
|
|
;
|
|
|
|
|
|
return t;
|
|
return t;
|
|
@@ -2107,18 +2105,10 @@ static struct seq_operations show_traces_seq_ops = {
|
|
|
|
|
|
static int show_traces_open(struct inode *inode, struct file *file)
|
|
static int show_traces_open(struct inode *inode, struct file *file)
|
|
{
|
|
{
|
|
- int ret;
|
|
|
|
-
|
|
|
|
if (tracing_disabled)
|
|
if (tracing_disabled)
|
|
return -ENODEV;
|
|
return -ENODEV;
|
|
|
|
|
|
- ret = seq_open(file, &show_traces_seq_ops);
|
|
|
|
- if (!ret) {
|
|
|
|
- struct seq_file *m = file->private_data;
|
|
|
|
- m->private = trace_types;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- return ret;
|
|
|
|
|
|
+ return seq_open(file, &show_traces_seq_ops);
|
|
}
|
|
}
|
|
|
|
|
|
static ssize_t
|
|
static ssize_t
|