summaryrefslogtreecommitdiff
path: root/drivers/acpi
diff options
context:
space:
mode:
authorRandy Dunlap <rdunlap@infradead.org>2018-07-07 08:25:01 -0700
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-07-09 11:32:44 +0200
commit2c4c2a71bd6f75c3982ac09407889b110673ac83 (patch)
tree44979ec4e5ecc836c60cd00728e0436374400a8e /drivers/acpi
parent7c058c7c74b3dbeb7d157c273959f87faf710350 (diff)
downloadlinux-rpi-2c4c2a71bd6f75c3982ac09407889b110673ac83.tar.gz
linux-rpi-2c4c2a71bd6f75c3982ac09407889b110673ac83.tar.bz2
linux-rpi-2c4c2a71bd6f75c3982ac09407889b110673ac83.zip
ACPI / button: fix defined but not used warning
Fix a build warning in the ACPI button driver when CONFIG_PROC_FS is not enabled by marking the unused function as __maybe_unused. ../drivers/acpi/button.c:252:12: warning: 'acpi_button_state_seq_show' defined but not used [-Wunused-function] Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/button.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index 40ed3ec9fc94..a19ff3977ac4 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -21,6 +21,7 @@
#define pr_fmt(fmt) "ACPI: button: " fmt
+#include <linux/compiler.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
@@ -249,7 +250,8 @@ static int acpi_lid_notify_state(struct acpi_device *device, int state)
return ret;
}
-static int acpi_button_state_seq_show(struct seq_file *seq, void *offset)
+static int __maybe_unused acpi_button_state_seq_show(struct seq_file *seq,
+ void *offset)
{
struct acpi_device *device = seq->private;
int state;