diff options
author | Pavel Emelianov <xemul@openvz.org> | 2007-07-09 16:12:24 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-07-11 01:18:48 -0400 |
commit | 9af97186fcc9a1d9bbf195eb4bc2399d0dd66223 (patch) | |
tree | 526a2be17c0464e6807efb196594bcb35843f23f /net | |
parent | 1c8c7d64169dc4b1ae3d8cd1bf35ea0a099b50ad (diff) |
[ATM] br2684: Use seq_list_xxx helpers
The .show callback receives the list_head pointer now, not the struct
br2684_dev one.
Signed-off-by: Pavel Emelianov <xemul@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/atm/br2684.c | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/net/atm/br2684.c b/net/atm/br2684.c index 0e9f00c5c899..3e2643893178 100644 --- a/net/atm/br2684.c +++ b/net/atm/br2684.c | |||
@@ -699,28 +699,13 @@ static struct atm_ioctl br2684_ioctl_ops = { | |||
699 | #ifdef CONFIG_PROC_FS | 699 | #ifdef CONFIG_PROC_FS |
700 | static void *br2684_seq_start(struct seq_file *seq, loff_t *pos) | 700 | static void *br2684_seq_start(struct seq_file *seq, loff_t *pos) |
701 | { | 701 | { |
702 | loff_t offs = 0; | ||
703 | struct br2684_dev *brd; | ||
704 | |||
705 | read_lock(&devs_lock); | 702 | read_lock(&devs_lock); |
706 | 703 | return seq_list_start(&br2684_devs, *pos); | |
707 | list_for_each_entry(brd, &br2684_devs, br2684_devs) { | ||
708 | if (offs == *pos) | ||
709 | return brd; | ||
710 | ++offs; | ||
711 | } | ||
712 | return NULL; | ||
713 | } | 704 | } |
714 | 705 | ||
715 | static void *br2684_seq_next(struct seq_file *seq, void *v, loff_t *pos) | 706 | static void *br2684_seq_next(struct seq_file *seq, void *v, loff_t *pos) |
716 | { | 707 | { |
717 | struct br2684_dev *brd = v; | 708 | return seq_list_next(v, &br2684_devs, pos); |
718 | |||
719 | ++*pos; | ||
720 | |||
721 | brd = list_entry(brd->br2684_devs.next, | ||
722 | struct br2684_dev, br2684_devs); | ||
723 | return (&brd->br2684_devs != &br2684_devs) ? brd : NULL; | ||
724 | } | 709 | } |
725 | 710 | ||
726 | static void br2684_seq_stop(struct seq_file *seq, void *v) | 711 | static void br2684_seq_stop(struct seq_file *seq, void *v) |
@@ -730,7 +715,8 @@ static void br2684_seq_stop(struct seq_file *seq, void *v) | |||
730 | 715 | ||
731 | static int br2684_seq_show(struct seq_file *seq, void *v) | 716 | static int br2684_seq_show(struct seq_file *seq, void *v) |
732 | { | 717 | { |
733 | const struct br2684_dev *brdev = v; | 718 | const struct br2684_dev *brdev = list_entry(v, struct br2684_dev, |
719 | br2684_devs); | ||
734 | const struct net_device *net_dev = brdev->net_dev; | 720 | const struct net_device *net_dev = brdev->net_dev; |
735 | const struct br2684_vcc *brvcc; | 721 | const struct br2684_vcc *brvcc; |
736 | 722 | ||