Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183992
b: refs/heads/master
c: 67de792
h: refs/heads/master
v: v3
  • Loading branch information
Li Zefan authored and David S. Miller committed Feb 10, 2010
1 parent 6a14445 commit ca70eb0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a2b79b414df97a70c33f874b631e06830431d233
refs/heads/master: 67de792420be2daa1c6fec07ec8552af9ea0bde3
2 changes: 1 addition & 1 deletion trunk/net/atm/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ static int atm_dev_seq_show(struct seq_file *seq, void *v)
"Itf Type ESI/\"MAC\"addr "
"AAL(TX,err,RX,err,drop) ... [refcnt]\n";

if (v == SEQ_START_TOKEN)
if (v == &atm_devs)
seq_puts(seq, atm_dev_banner);
else {
struct atm_dev *dev = list_entry(v, struct atm_dev, dev_list);
Expand Down
18 changes: 2 additions & 16 deletions trunk/net/atm/resources.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,21 +444,10 @@ int atm_dev_ioctl(unsigned int cmd, void __user *arg, int compat)
return error;
}

static inline void *dev_get_idx(loff_t left)
{
struct list_head *p;

list_for_each(p, &atm_devs) {
if (!--left)
break;
}
return (p != &atm_devs) ? p : NULL;
}

void *atm_dev_seq_start(struct seq_file *seq, loff_t *pos)
{
mutex_lock(&atm_dev_mutex);
return *pos ? dev_get_idx(*pos) : SEQ_START_TOKEN;
return seq_list_start_head(&atm_devs, *pos);
}

void atm_dev_seq_stop(struct seq_file *seq, void *v)
Expand All @@ -468,8 +457,5 @@ void atm_dev_seq_stop(struct seq_file *seq, void *v)

void *atm_dev_seq_next(struct seq_file *seq, void *v, loff_t *pos)
{
++*pos;
v = (v == SEQ_START_TOKEN)
? atm_devs.next : ((struct list_head *)v)->next;
return (v == &atm_devs) ? NULL : v;
return seq_list_next(v, &atm_devs, pos);
}

0 comments on commit ca70eb0

Please sign in to comment.