[2/3] ARM: omap1: avoid unused variable warning

Message ID 1456235876-4088840-3-git-send-email-arnd@arndb.de
State New
Headers show
  • ARM: omap: randconfig warning fixes
Related show

Commit Message

Arnd Bergmann Feb. 23, 2016, 1:57 p.m.
The osk_mistral_init() contains code that is only compiled when
CONFIG_PM is set, but it uses a variable that is declared outside
of the #ifdef:

arch/arm/mach-omap1/board-osk.c: In function 'osk_mistral_init':
arch/arm/mach-omap1/board-osk.c:513:7: warning: unused variable 'ret' [-Wunused-variable]

This puts the variable in the same #ifdef to avoid the warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

 arch/arm/mach-omap1/board-osk.c | 2 ++
 1 file changed, 2 insertions(+)


To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c
index 209aecb0df68..fcc5c0650429 100644
--- a/arch/arm/mach-omap1/board-osk.c
+++ b/arch/arm/mach-omap1/board-osk.c
@@ -510,7 +510,9 @@  static void __init osk_mistral_init(void)
 	if (gpio_request(OMAP_MPUIO(2), "wakeup") == 0) {
+#ifdef	CONFIG_PM
 		int ret = 0;
 		int irq = gpio_to_irq(OMAP_MPUIO(2));