Home
last modified time | relevance | path

Searched hist:"990162 f038400bd229685316beea1155be095125" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/char/
H A Dnwbutton.cdiff 990162f038400bd229685316beea1155be095125 Mon Jan 25 09:54:25 CST 2016 Arnd Bergmann <arnd@arndb.de> 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: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>