summary refs log tree commit diff
path: root/fs/proc/devices.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-04-13 19:44:18 +0200
committerChristoph Hellwig <hch@lst.de>2018-05-16 07:23:35 +0200
commitfddda2b7b521185f3aa018f9559eb33b0aee53a9 (patch)
treeece18b3d82822f8eaefd8b0afa2f93307e83b253 /fs/proc/devices.c
parent7aed53d1dfd14d468e065212ce45068e2b50c1fa (diff)
downloadlinux-fddda2b7b521185f3aa018f9559eb33b0aee53a9.tar.gz
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/devices.c')
-rw-r--r--fs/proc/devices.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/fs/proc/devices.c b/fs/proc/devices.c
index 2c7f22b14489..37d38697eaf8 100644
--- a/fs/proc/devices.c
+++ b/fs/proc/devices.c
@@ -51,21 +51,9 @@ static const struct seq_operations devinfo_ops = {
 	.show  = devinfo_show
 };
 
-static int devinfo_open(struct inode *inode, struct file *filp)
-{
-	return seq_open(filp, &devinfo_ops);
-}
-
-static const struct file_operations proc_devinfo_operations = {
-	.open		= devinfo_open,
-	.read		= seq_read,
-	.llseek		= seq_lseek,
-	.release	= seq_release,
-};
-
 static int __init proc_devices_init(void)
 {
-	proc_create("devices", 0, NULL, &proc_devinfo_operations);
+	proc_create_seq("devices", 0, NULL, &devinfo_ops);
 	return 0;
 }
 fs_initcall(proc_devices_init);