Skip to content
/ linux Public
forked from torvalds/linux

Commit

Permalink
ACPI: fix acpi_debugfs_init prototype
Browse files Browse the repository at this point in the history
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 aecad43 ("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 <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
  • Loading branch information
fishilico authored and rafaeljw committed Aug 7, 2015
1 parent 4c62dbb commit 1074261
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions drivers/acpi/debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#include <linux/debugfs.h>
#include <linux/acpi.h>

#include "internal.h"

#define _COMPONENT ACPI_SYSTEM_COMPONENT
ACPI_MODULE_NAME("debugfs");

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void acpi_scan_hotplug_enabled(struct acpi_hotplug_profile *hotplug, bool val);

#ifdef CONFIG_DEBUG_FS
extern struct dentry *acpi_debugfs_dir;
int acpi_debugfs_init(void);
void acpi_debugfs_init(void);
#else
static inline void acpi_debugfs_init(void) { return; }
#endif
Expand Down

0 comments on commit 1074261

Please sign in to comment.