Declare the show function and let procfs open the seq_file.

Signed-off-by: Christian Brauner (Amutable) <[email protected]>
---
 include/linux/seq_file.h | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h
index dc0e8c62d9e0..b813b7e63d89 100644
--- a/include/linux/seq_file.h
+++ b/include/linux/seq_file.h
@@ -233,16 +233,8 @@ static const struct file_operations __name ## _fops = {    
                \
 }
 
 #define DEFINE_PROC_SHOW_ATTRIBUTE(__name)                             \
-static int __name ## _open(struct inode *inode, struct file *file)     \
-{                                                                      \
-       return single_open(file, __name ## _show, pde_data(inode));     \
-}                                                                      \
-                                                                       \
 static const struct proc_ops __name ## _proc_ops = {                   \
-       .proc_open      = __name ## _open,                              \
-       .proc_read      = seq_read,                                     \
-       .proc_lseek     = seq_lseek,                                    \
-       .proc_release   = single_release,                               \
+       .proc_show      = __name ## _show,                              \
 }
 
 static inline struct user_namespace *seq_user_ns(struct seq_file *seq)

-- 
2.53.0


Reply via email to