From fddda2b7b521185f3aa018f9559eb33b0aee53a9 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Fri, 13 Apr 2018 19:44:18 +0200 Subject: proc: introduce proc_create_seq{,_data} Variants of proc_create{,_data} that directly take a struct seq_operations argument and drastically reduces the boilerplate code in the callers. All trivial callers converted over. Signed-off-by: Christoph Hellwig --- net/atm/br2684.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'net/atm') diff --git a/net/atm/br2684.c b/net/atm/br2684.c index fd94bea36ee8..36b3adacc0dd 100644 --- a/net/atm/br2684.c +++ b/net/atm/br2684.c @@ -818,18 +818,6 @@ static const struct seq_operations br2684_seq_ops = { .show = br2684_seq_show, }; -static int br2684_proc_open(struct inode *inode, struct file *file) -{ - return seq_open(file, &br2684_seq_ops); -} - -static const struct file_operations br2684_proc_ops = { - .open = br2684_proc_open, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release, -}; - extern struct proc_dir_entry *atm_proc_root; /* from proc.c */ #endif /* CONFIG_PROC_FS */ @@ -837,7 +825,7 @@ static int __init br2684_init(void) { #ifdef CONFIG_PROC_FS struct proc_dir_entry *p; - p = proc_create("br2684", 0, atm_proc_root, &br2684_proc_ops); + p = proc_create_seq("br2684", 0, atm_proc_root, &br2684_seq_ops); if (p == NULL) return -ENOMEM; #endif -- cgit v1.2.3-59-g8ed1b