Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 60799
b: refs/heads/master
c: 2b7c302
h: refs/heads/master
i:
  60797: 6a0b7a3
  60795: 1312730
  60791: 39f392e
  60783: 221bdc7
  60767: 36ab747
  60735: ed90eb4
  60671: e9fa1c9
v: v3
  • Loading branch information
Pavel Emelianov authored and Linus Torvalds committed Jul 17, 2007
1 parent 303454e commit e2988f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 25 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: 6acee02712d0592dcd6120bc54d77c47cd2f6059
refs/heads/master: 2b7c30292af56e64feaecdbe97da57918927b730
28 changes: 4 additions & 24 deletions trunk/drivers/isdn/capi/kcapi_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,36 +243,15 @@ create_seq_entry(char *name, mode_t mode, const struct file_operations *f)

// ---------------------------------------------------------------------------


static __inline__ struct capi_driver *capi_driver_get_idx(loff_t pos)
{
struct capi_driver *drv = NULL;
struct list_head *l;
loff_t i;

i = 0;
list_for_each(l, &capi_drivers) {
drv = list_entry(l, struct capi_driver, list);
if (i++ == pos)
return drv;
}
return NULL;
}

static void *capi_driver_start(struct seq_file *seq, loff_t *pos)
{
struct capi_driver *drv;
read_lock(&capi_drivers_list_lock);
drv = capi_driver_get_idx(*pos);
return drv;
return seq_list_start(&capi_drivers, *pos);
}

static void *capi_driver_next(struct seq_file *seq, void *v, loff_t *pos)
{
struct capi_driver *drv = (struct capi_driver *)v;
++*pos;
if (drv->list.next == &capi_drivers) return NULL;
return list_entry(drv->list.next, struct capi_driver, list);
return seq_list_next(v, &capi_drivers, pos);
}

static void capi_driver_stop(struct seq_file *seq, void *v)
Expand All @@ -282,7 +261,8 @@ static void capi_driver_stop(struct seq_file *seq, void *v)

static int capi_driver_show(struct seq_file *seq, void *v)
{
struct capi_driver *drv = (struct capi_driver *)v;
struct capi_driver *drv = list_entry(v, struct capi_driver, list);

seq_printf(seq, "%-32s %s\n", drv->name, drv->revision);
return 0;
}
Expand Down

0 comments on commit e2988f4

Please sign in to comment.