proc: introduce proc_create_seq{,_data}
[linux-2.6-microblaze.git] / net / sctp / objcnt.c
index fd2684a..a6179b2 100644 (file)
@@ -108,25 +108,13 @@ static const struct seq_operations sctp_objcnt_seq_ops = {
        .show  = sctp_objcnt_seq_show,
 };
 
-static int sctp_objcnt_seq_open(struct inode *inode, struct file *file)
-{
-       return seq_open(file, &sctp_objcnt_seq_ops);
-}
-
-static const struct file_operations sctp_objcnt_ops = {
-       .open    = sctp_objcnt_seq_open,
-       .read    = seq_read,
-       .llseek  = seq_lseek,
-       .release = seq_release,
-};
-
 /* Initialize the objcount in the proc filesystem.  */
 void sctp_dbg_objcnt_init(struct net *net)
 {
        struct proc_dir_entry *ent;
 
-       ent = proc_create("sctp_dbg_objcnt", 0,
-                         net->sctp.proc_net_sctp, &sctp_objcnt_ops);
+       ent = proc_create_seq("sctp_dbg_objcnt", 0,
+                         net->sctp.proc_net_sctp, &sctp_objcnt_seq_ops);
        if (!ent)
                pr_warn("sctp_dbg_objcnt: Unable to create /proc entry.\n");
 }