diff options
author | Nicolas Iooss <nicolas.iooss_linux@m4x.org> | 2015-08-01 09:32:17 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-08-06 20:55:18 -0400 |
commit | 10742619ac63641bcce0a7c07f0dc7509201ed72 (patch) | |
tree | 021a7d29f96ced8255cbe634a750861442960efd | |
parent | 4c62dbbce902cf2afa88cac89ec67c828160f431 (diff) |
ACPI: fix acpi_debugfs_init prototype
acpi_debugfs_init function is declared with return type int in
drivers/acpi/internal.h when CONFIG_DEBUG_FS is enabled, but its
definition in drivers/acpi/debugfs.c has return type void. This is due
to commit aecad432fd68 ("ACPI: Cleanup custom_method debug stuff"),
which changed the return type from int to void without updating the
declaration.
Fix this inconsistency by updating acpi_debugfs_init prototype. While
at it, include internal.h in debugfs.c so that the compiler can check
that the declaration and definition remain compatible.
Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/acpi/debugfs.c | 2 | ||||
-rw-r--r-- | drivers/acpi/internal.h | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/drivers/acpi/debugfs.c b/drivers/acpi/debugfs.c index 6b1919f6bd82..68bb305b977f 100644 --- a/drivers/acpi/debugfs.c +++ b/drivers/acpi/debugfs.c | |||
@@ -7,6 +7,8 @@ | |||
7 | #include <linux/debugfs.h> | 7 | #include <linux/debugfs.h> |
8 | #include <linux/acpi.h> | 8 | #include <linux/acpi.h> |
9 | 9 | ||
10 | #include "internal.h" | ||
11 | |||
10 | #define _COMPONENT ACPI_SYSTEM_COMPONENT | 12 | #define _COMPONENT ACPI_SYSTEM_COMPONENT |
11 | ACPI_MODULE_NAME("debugfs"); | 13 | ACPI_MODULE_NAME("debugfs"); |
12 | 14 | ||
diff --git a/drivers/acpi/internal.h b/drivers/acpi/internal.h index 8c71cb8335c0..daf0974d863c 100644 --- a/drivers/acpi/internal.h +++ b/drivers/acpi/internal.h | |||
@@ -67,7 +67,7 @@ void acpi_scan_hotplug_enabled(struct acpi_hotplug_profile *hotplug, bool val); | |||
67 | 67 | ||
68 | #ifdef CONFIG_DEBUG_FS | 68 | #ifdef CONFIG_DEBUG_FS |
69 | extern struct dentry *acpi_debugfs_dir; | 69 | extern struct dentry *acpi_debugfs_dir; |
70 | int acpi_debugfs_init(void); | 70 | void acpi_debugfs_init(void); |
71 | #else | 71 | #else |
72 | static inline void acpi_debugfs_init(void) { return; } | 72 | static inline void acpi_debugfs_init(void) { return; } |
73 | #endif | 73 | #endif |