]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/seq_file.c
Driver core: add missing kset uevent
[linux-2.6-omap-h63xx.git] / fs / seq_file.c
index 0ac22af7afe5f2b31ea2d289f68b5ee13e1b9040..49194a4e6b91ba9dcd22c3aa7fe81f794aca4413 100644 (file)
@@ -447,3 +447,37 @@ int seq_puts(struct seq_file *m, const char *s)
        return -1;
 }
 EXPORT_SYMBOL(seq_puts);
+
+struct list_head *seq_list_start(struct list_head *head, loff_t pos)
+{
+       struct list_head *lh;
+
+       list_for_each(lh, head)
+               if (pos-- == 0)
+                       return lh;
+
+       return NULL;
+}
+
+EXPORT_SYMBOL(seq_list_start);
+
+struct list_head *seq_list_start_head(struct list_head *head, loff_t pos)
+{
+       if (!pos)
+               return head;
+
+       return seq_list_start(head, pos - 1);
+}
+
+EXPORT_SYMBOL(seq_list_start_head);
+
+struct list_head *seq_list_next(void *v, struct list_head *head, loff_t *ppos)
+{
+       struct list_head *lh;
+
+       lh = ((struct list_head *)v)->next;
+       ++*ppos;
+       return lh == head ? NULL : lh;
+}
+
+EXPORT_SYMBOL(seq_list_next);