[07/12] ARM: omap1: avoid unused variable warning

Message ID 20170720155209.3250880-4-arnd@arndb.de
State New
Headers show
  • ARM: randconfig patches for platforms
Related show

Commit Message

Arnd Bergmann July 20, 2017, 3:51 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 removes the #ifdef around the user of the variable,
make it always used.

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

Suggested-by: Tony Lindgren <tony@atomide.com>
Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi>

 arch/arm/mach-omap1/board-osk.c | 4 ----
 1 file changed, 4 deletions(-)


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 4dfb99504810..95ac1929aede 100644
--- a/arch/arm/mach-omap1/board-osk.c
+++ b/arch/arm/mach-omap1/board-osk.c
@@ -441,13 +441,11 @@  static struct spi_board_info __initdata mistral_boardinfo[] = { {
 	.chip_select		= 0,
 } };
-#ifdef	CONFIG_PM
 static irqreturn_t
 osk_mistral_wake_interrupt(int irq, void *ignored)
 	return IRQ_HANDLED;
 static void __init osk_mistral_init(void)
@@ -515,7 +513,6 @@  static void __init osk_mistral_init(void)
 		irq_set_irq_type(irq, IRQ_TYPE_EDGE_RISING);
-#ifdef	CONFIG_PM
 		/* share the IRQ in case someone wants to use the
 		 * button for more than wakeup from system sleep.
@@ -529,7 +526,6 @@  static void __init osk_mistral_init(void)
 		} else
 	} else
 		printk(KERN_ERR "OSK+Mistral: wakeup button is awol\n");