]> asedeno.scripts.mit.edu Git - linux.git/commit
debugfs: Consolidate file mode checks in debugfs_create_*()
authorStephen Boyd <sboyd@codeaurora.org>
Tue, 13 Oct 2015 01:09:09 +0000 (18:09 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 18 Oct 2015 05:09:03 +0000 (22:09 -0700)
commitb97f679954b7771183f3c0a6a47b17e185e64a8a
tree0b91b510adba6a9c2016e603ea1fb624164a3eac
parent8346aa765e14348b7b436825b3c4740895a2fe1a
debugfs: Consolidate file mode checks in debugfs_create_*()

The code that creates debugfs file with different file ops based
on the file mode is duplicated in each debugfs_create_*() API.
Consolidate that code into debugfs_create_mode(), that takes
three file ops structures so that we don't have to keep
copy/pasting that logic.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/debugfs/file.c