提交 68f929ff 编写于 作者: J Jakub Kicinski 提交者: David S. Miller

debugfs: constify argument to debugfs_real_fops()

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 <gregkh@linuxfoundation.org>
CC: Nicolai Stange <nicstange@gmail.com>
CC: Christian Lamparter <chunkeey@gmail.com>
CC: LKML <linux-kernel@vger.kernel.org>
Signed-off-by: NJakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 13df4c66
...@@ -52,7 +52,8 @@ extern struct srcu_struct debugfs_srcu; ...@@ -52,7 +52,8 @@ extern struct srcu_struct debugfs_srcu;
* Must only be called under the protection established by * Must only be called under the protection established by
* debugfs_use_file_start(). * 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) __must_hold(&debugfs_srcu)
{ {
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册