debugfs: constify argument to debugfs_real_fops()
authorJakub Kicinski <[email protected]>
Thu, 3 Nov 2016 17:12:06 +0000 (17:12 +0000)
committerDavid S. Miller <[email protected]>
Fri, 4 Nov 2016 18:56:16 +0000 (14:56 -0400)
seq_file users can only access const version of file pointer,
because the ->file member of struct seq_operations is marked
as such.  Make parameter to debugfs_real_fops() const.

CC: Greg Kroah-Hartman <[email protected]>
CC: Nicolai Stange <[email protected]>
CC: Christian Lamparter <[email protected]>
CC: LKML <[email protected]>
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
include/linux/debugfs.h

index 4d3f0d1aec73b856552f5d5e30b706ef5d2e04ec..bf1907d96097c474685b8c8f6d52a5e70d86769b 100644 (file)
@@ -52,7 +52,8 @@ extern struct srcu_struct debugfs_srcu;
  * Must only be called under the protection established by
  * debugfs_use_file_start().
  */
-static inline const struct file_operations *debugfs_real_fops(struct file *filp)
+static inline const struct file_operations *
+debugfs_real_fops(const struct file *filp)
        __must_hold(&debugfs_srcu)
 {
        /*