Skip to content
Commit 990162f0 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Greg Kroah-Hartman
Browse files

char: nwbutton: avoid unused variable warning



When CONFIG_NWBUTTON_REBOOT is disabled, we get a warning about
an unused variable:

drivers/char/nwbutton.c:37:12: warning: 'reboot_count' defined but not used [-Wunused-variable]
 static int reboot_count = NUM_PRESSES_REBOOT; /* Number of presses to reboot */

Using if(IS_ENABLED()) instead of #ifdef around the user makes the
code nicer to read and avoids the warning.

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c74c9318
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment