Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
[sfrench/cifs-2.6.git] / include / linux / seq_file.h
index b95f6eb7254cd889bfc5c9db9ab2d6029e0f2994..83783ab0f5524d7ad5e4e3092aa1790cdec527c9 100644 (file)
@@ -20,7 +20,7 @@ struct seq_file {
        loff_t index;
        loff_t version;
        struct mutex lock;
-       struct seq_operations *op;
+       const struct seq_operations *op;
        void *private;
 };
 
@@ -31,7 +31,7 @@ struct seq_operations {
        int (*show) (struct seq_file *m, void *v);
 };
 
-int seq_open(struct file *, struct seq_operations *);
+int seq_open(struct file *, const struct seq_operations *);
 ssize_t seq_read(struct file *, char __user *, size_t, loff_t *);
 loff_t seq_lseek(struct file *, loff_t, int);
 int seq_release(struct inode *, struct file *);
@@ -50,5 +50,16 @@ int seq_release_private(struct inode *, struct file *);
 
 #define SEQ_START_TOKEN ((void *)1)
 
+/*
+ * Helpers for iteration over list_head-s in seq_files
+ */
+
+extern struct list_head *seq_list_start(struct list_head *head,
+               loff_t pos);
+extern struct list_head *seq_list_start_head(struct list_head *head,
+               loff_t pos);
+extern struct list_head *seq_list_next(void *v, struct list_head *head,
+               loff_t *ppos);
+
 #endif
 #endif