aboutsummaryrefslogtreecommitdiffstats
path: root/net/atm/resources.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2008-04-10 06:33:03 -0400
committerDavid S. Miller <davem@davemloft.net>2008-04-10 06:33:03 -0400
commit2e1e9848accba7e5f6a731bf0d0fc2c84f3ee748 (patch)
tree7e79d8938d7763f77c66b8448c358f5adc8ba14b /net/atm/resources.c
parent4dfc2817025965a2fc78a18c50f540736a6b5c24 (diff)
[ATM]: Use SEQ_START_TOKEN
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/atm/resources.c')
-rw-r--r--net/atm/resources.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/atm/resources.c b/net/atm/resources.c
index 1bcf6dc8d409..a34ba948af96 100644
--- a/net/atm/resources.c
+++ b/net/atm/resources.c
@@ -415,7 +415,7 @@ static __inline__ void *dev_get_idx(loff_t left)
415void *atm_dev_seq_start(struct seq_file *seq, loff_t *pos) 415void *atm_dev_seq_start(struct seq_file *seq, loff_t *pos)
416{ 416{
417 mutex_lock(&atm_dev_mutex); 417 mutex_lock(&atm_dev_mutex);
418 return *pos ? dev_get_idx(*pos) : (void *) 1; 418 return *pos ? dev_get_idx(*pos) : SEQ_START_TOKEN;
419} 419}
420 420
421void atm_dev_seq_stop(struct seq_file *seq, void *v) 421void atm_dev_seq_stop(struct seq_file *seq, void *v)
@@ -426,7 +426,8 @@ void atm_dev_seq_stop(struct seq_file *seq, void *v)
426void *atm_dev_seq_next(struct seq_file *seq, void *v, loff_t *pos) 426void *atm_dev_seq_next(struct seq_file *seq, void *v, loff_t *pos)
427{ 427{
428 ++*pos; 428 ++*pos;
429 v = (v == (void *)1) ? atm_devs.next : ((struct list_head *)v)->next; 429 v = (v == SEQ_START_TOKEN)
430 ? atm_devs.next : ((struct list_head *)v)->next;
430 return (v == &atm_devs) ? NULL : v; 431 return (v == &atm_devs) ? NULL : v;
431} 432}
432 433