Skip to content
Snippets Groups Projects
Commit a7a76cef authored by Roland Dreier's avatar Roland Dreier Committed by Greg KH
Browse files

[PATCH] debugfs: Reduce <linux/debugfs.h> dependencies


The current <linux/debugfs.h> include file is a little fragile in that
it is not self-contained and hence may cause compile warnings or
errors depending on the files included before it, the kernel config
and the architecture.  This patch makes things a little more robust by:

 - including <linux/types.h> to get definitions of u32, mode_t, and so on.
 - forward declaring struct file_operations.
 - including <linux/err.h> when CONFIG_DEBUG_FS is not set

The last change is particularly useful, as a kernel developer is
likely to build with debugfs always enabled and never see the build
breakage cased if debugfs is disabled.

Signed-off-by: default avatarRoland Dreier <roland@topspin.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 16941458
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment