summaryrefslogtreecommitdiff
path: root/arch/sparc
diff options
context:
space:
mode:
authorRandy Dunlap <rdunlap@infradead.org>2020-11-17 03:48:00 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-03-04 13:38:10 +0300
commit0fda33ea8947421e4e4f6108e7c525b60d06fd50 (patch)
tree58e8e9c8904248a6765adaeb8c6e085634ae4e7f /arch/sparc
parent103ca2da81c2b0204b5180c1f3b817eb01a4de45 (diff)
downloadlinux-0fda33ea8947421e4e4f6108e7c525b60d06fd50.tar.xz
sparc: fix led.c driver when PROC_FS is not enabled
[ Upstream commit b3554aa2470b5db1222c31e08ec9c29ab33eabc7 ] Fix Sparc build when CONFIG_PROC_FS is not enabled. Fixes this build error: arch/sparc/kernel/led.c:107:30: error: 'led_proc_ops' defined but not used [-Werror=unused-const-variable=] 107 | static const struct proc_ops led_proc_ops = { | ^~~~~~~~~~~~ cc1: all warnings being treated as errors Fixes: 97a32539b956 ("proc: convert everything to "struct proc_ops"") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Lars Kotthoff <metalhead@metalhead.ws> Cc: "David S. Miller" <davem@davemloft.net> Cc: sparclinux@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/kernel/led.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/sparc/kernel/led.c b/arch/sparc/kernel/led.c
index bd48575172c3..3a66e62eb2a0 100644
--- a/arch/sparc/kernel/led.c
+++ b/arch/sparc/kernel/led.c
@@ -50,6 +50,7 @@ static void led_blink(struct timer_list *unused)
add_timer(&led_blink_timer);
}
+#ifdef CONFIG_PROC_FS
static int led_proc_show(struct seq_file *m, void *v)
{
if (get_auxio() & AUXIO_LED)
@@ -111,6 +112,7 @@ static const struct proc_ops led_proc_ops = {
.proc_release = single_release,
.proc_write = led_proc_write,
};
+#endif
static struct proc_dir_entry *led;