Commit d1c88887 authored by Arnd Bergmann's avatar Arnd Bergmann

ARM: omap1: avoid unused variable warning

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: default avatarArnd Bergmann <arnd@arndb.de>
Suggested-by: default avatarTony Lindgren <tony@atomide.com>
Acked-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
parent c1ae3f7c
...@@ -441,13 +441,11 @@ static struct spi_board_info __initdata mistral_boardinfo[] = { { ...@@ -441,13 +441,11 @@ static struct spi_board_info __initdata mistral_boardinfo[] = { {
.chip_select = 0, .chip_select = 0,
} }; } };
#ifdef CONFIG_PM
static irqreturn_t static irqreturn_t
osk_mistral_wake_interrupt(int irq, void *ignored) osk_mistral_wake_interrupt(int irq, void *ignored)
{ {
return IRQ_HANDLED; return IRQ_HANDLED;
} }
#endif
static void __init osk_mistral_init(void) static void __init osk_mistral_init(void)
{ {
...@@ -515,7 +513,6 @@ static void __init osk_mistral_init(void) ...@@ -515,7 +513,6 @@ static void __init osk_mistral_init(void)
gpio_direction_input(OMAP_MPUIO(2)); gpio_direction_input(OMAP_MPUIO(2));
irq_set_irq_type(irq, IRQ_TYPE_EDGE_RISING); irq_set_irq_type(irq, IRQ_TYPE_EDGE_RISING);
#ifdef CONFIG_PM
/* share the IRQ in case someone wants to use the /* share the IRQ in case someone wants to use the
* button for more than wakeup from system sleep. * button for more than wakeup from system sleep.
*/ */
...@@ -529,7 +526,6 @@ static void __init osk_mistral_init(void) ...@@ -529,7 +526,6 @@ static void __init osk_mistral_init(void)
ret); ret);
} else } else
enable_irq_wake(irq); enable_irq_wake(irq);
#endif
} else } else
printk(KERN_ERR "OSK+Mistral: wakeup button is awol\n"); printk(KERN_ERR "OSK+Mistral: wakeup button is awol\n");
......
Markdown is supported
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