]>
Commit | Line | Data |
---|---|---|
47f38bc9 GKH |
1 | From foo@baz Fri Sep 21 09:36:02 CEST 2018 |
2 | From: Randy Dunlap <rdunlap@infradead.org> | |
3 | Date: Fri, 6 Jul 2018 20:53:09 -0700 | |
4 | Subject: platform/x86: toshiba_acpi: Fix defined but not used build warnings | |
5 | ||
6 | From: Randy Dunlap <rdunlap@infradead.org> | |
7 | ||
8 | [ Upstream commit c2e2a618eb7104e18fdcf739d4d911563812a81c ] | |
9 | ||
10 | Fix a build warning in toshiba_acpi.c when CONFIG_PROC_FS is not enabled | |
11 | by marking the unused function as __maybe_unused. | |
12 | ||
13 | ../drivers/platform/x86/toshiba_acpi.c:1685:12: warning: 'version_proc_show' defined but not used [-Wunused-function] | |
14 | ||
15 | Signed-off-by: Randy Dunlap <rdunlap@infradead.org> | |
16 | Cc: Azael Avalos <coproscefalo@gmail.com> | |
17 | Cc: platform-driver-x86@vger.kernel.org | |
18 | Cc: Andy Shevchenko <andy@infradead.org> | |
19 | Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org> | |
20 | Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> | |
21 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
22 | --- | |
23 | drivers/platform/x86/toshiba_acpi.c | 3 ++- | |
24 | 1 file changed, 2 insertions(+), 1 deletion(-) | |
25 | ||
26 | --- a/drivers/platform/x86/toshiba_acpi.c | |
27 | +++ b/drivers/platform/x86/toshiba_acpi.c | |
28 | @@ -34,6 +34,7 @@ | |
29 | #define TOSHIBA_ACPI_VERSION "0.24" | |
30 | #define PROC_INTERFACE_VERSION 1 | |
31 | ||
32 | +#include <linux/compiler.h> | |
33 | #include <linux/kernel.h> | |
34 | #include <linux/module.h> | |
35 | #include <linux/moduleparam.h> | |
36 | @@ -1687,7 +1688,7 @@ static const struct file_operations keys | |
37 | .write = keys_proc_write, | |
38 | }; | |
39 | ||
40 | -static int version_proc_show(struct seq_file *m, void *v) | |
41 | +static int __maybe_unused version_proc_show(struct seq_file *m, void *v) | |
42 | { | |
43 | seq_printf(m, "driver: %s\n", TOSHIBA_ACPI_VERSION); | |
44 | seq_printf(m, "proc_interface: %d\n", PROC_INTERFACE_VERSION); |