Skip to content

Commit

Permalink
ACPI / button: fix defined but not used warning
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
rddunlap authored and rafaeljw committed Jul 9, 2018
1 parent 7c058c7 commit 2c4c2a7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/acpi/button.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 2c4c2a7

Please sign in to comment.