summaryrefslogtreecommitdiffstats
path: root/fs/proc/nommu.c
diff options
context:
space:
mode:
authorChristoph Hellwig2018-04-13 19:44:18 +0200
committerChristoph Hellwig2018-05-16 07:23:35 +0200
commitfddda2b7b521185f3aa018f9559eb33b0aee53a9 (patch)
treeece18b3d82822f8eaefd8b0afa2f93307e83b253 /fs/proc/nommu.c
parentproc: add a proc_create_reg helper (diff)
downloadkernel-qcow2-linux-fddda2b7b521185f3aa018f9559eb33b0aee53a9.tar.gz
kernel-qcow2-linux-fddda2b7b521185f3aa018f9559eb33b0aee53a9.tar.xz
kernel-qcow2-linux-fddda2b7b521185f3aa018f9559eb33b0aee53a9.zip
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 'fs/proc/nommu.c')
-rw-r--r--fs/proc/nommu.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c
index 75634379f82e..3b63be64e436 100644
--- a/fs/proc/nommu.c
+++ b/fs/proc/nommu.c
@@ -113,21 +113,9 @@ static const struct seq_operations proc_nommu_region_list_seqop = {
.show = nommu_region_list_show
};
-static int proc_nommu_region_list_open(struct inode *inode, struct file *file)
-{
- return seq_open(file, &proc_nommu_region_list_seqop);
-}
-
-static const struct file_operations proc_nommu_region_list_operations = {
- .open = proc_nommu_region_list_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = seq_release,
-};
-
static int __init proc_nommu_init(void)
{
- proc_create("maps", S_IRUGO, NULL, &proc_nommu_region_list_operations);
+ proc_create_seq("maps", S_IRUGO, NULL, &proc_nommu_region_list_seqop);
return 0;
}