lkml.org 
[lkml]   [2018]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] ACPI: button: hide unused procfs helpers
Date
When CONFIG_PROC_FS isn't set, gcc warning this:

drivers/acpi/button.c:255:12: warning: ‘acpi_button_state_seq_show’ defined but not used [-Wunused-function]
static int acpi_button_state_seq_show(struct seq_file *seq, void *offset)
^
fix this by adding #ifdef around it.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/acpi/button.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index 2345a5e..8538e25 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -252,6 +252,7 @@ static int acpi_lid_notify_state(struct acpi_device *device, int state)
return ret;
}

+#ifdef CONFIG_PROC_FS
static int acpi_button_state_seq_show(struct seq_file *seq, void *offset)
{
struct acpi_device *device = seq->private;
@@ -262,6 +263,7 @@ static int acpi_button_state_seq_show(struct seq_file *seq, void *offset)
state < 0 ? "unsupported" : (state ? "open" : "closed"));
return 0;
}
+#endif

static int acpi_button_add_fs(struct acpi_device *device)
{
--
2.7.0

\
 
 \ /
  Last update: 2018-07-15 22:06    [W:0.031 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site