diff options
author | Christoph Hellwig <hch@lst.de> | 2018-04-13 13:44:18 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2018-05-16 01:23:35 -0400 |
commit | fddda2b7b521185f3aa018f9559eb33b0aee53a9 (patch) | |
tree | ece18b3d82822f8eaefd8b0afa2f93307e83b253 /net/atm | |
parent | 7aed53d1dfd14d468e065212ce45068e2b50c1fa (diff) |
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 <hch@lst.de>
Diffstat (limited to 'net/atm')
-rw-r--r-- | net/atm/br2684.c | 14 |
1 files changed, 1 insertions, 13 deletions
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 = { | |||
818 | .show = br2684_seq_show, | 818 | .show = br2684_seq_show, |
819 | }; | 819 | }; |
820 | 820 | ||
821 | static int br2684_proc_open(struct inode *inode, struct file *file) | ||
822 | { | ||
823 | return seq_open(file, &br2684_seq_ops); | ||
824 | } | ||
825 | |||
826 | static const struct file_operations br2684_proc_ops = { | ||
827 | .open = br2684_proc_open, | ||
828 | .read = seq_read, | ||
829 | .llseek = seq_lseek, | ||
830 | .release = seq_release, | ||
831 | }; | ||
832 | |||
833 | extern struct proc_dir_entry *atm_proc_root; /* from proc.c */ | 821 | extern struct proc_dir_entry *atm_proc_root; /* from proc.c */ |
834 | #endif /* CONFIG_PROC_FS */ | 822 | #endif /* CONFIG_PROC_FS */ |
835 | 823 | ||
@@ -837,7 +825,7 @@ static int __init br2684_init(void) | |||
837 | { | 825 | { |
838 | #ifdef CONFIG_PROC_FS | 826 | #ifdef CONFIG_PROC_FS |
839 | struct proc_dir_entry *p; | 827 | struct proc_dir_entry *p; |
840 | p = proc_create("br2684", 0, atm_proc_root, &br2684_proc_ops); | 828 | p = proc_create_seq("br2684", 0, atm_proc_root, &br2684_seq_ops); |
841 | if (p == NULL) | 829 | if (p == NULL) |
842 | return -ENOMEM; | 830 | return -ENOMEM; |
843 | #endif | 831 | #endif |