summaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-nomadik/gpio.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2011-02-16 10:37:52 +0100
committerLinus Walleij <linus.walleij@linaro.org>2011-03-14 14:05:16 +0100
commit3c4bee04d147f149a167633cf0033f9d25a8d720 (patch)
tree11ffba9a7666ead117cf71da6f604fe1860528a9 /arch/arm/plat-nomadik/gpio.c
parentplat-nomadik: get rid of unused GPIO PM code (diff)
downloadlinux-3c4bee04d147f149a167633cf0033f9d25a8d720.tar.xz
linux-3c4bee04d147f149a167633cf0033f9d25a8d720.zip
plat-nomadik: fix compilation warning
The compiler warns that [rf]wimsc may be used uninitialized in this function - the warning is actually false since the uses are in identical if()-clauses, but it can't hurt very much to read out the values to be modified early anyway and rid the warning. Cc: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/plat-nomadik/gpio.c')
-rw-r--r--arch/arm/plat-nomadik/gpio.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/arm/plat-nomadik/gpio.c b/arch/arm/plat-nomadik/gpio.c
index 5e6653f63286..45b1cf95e378 100644
--- a/arch/arm/plat-nomadik/gpio.c
+++ b/arch/arm/plat-nomadik/gpio.c
@@ -134,15 +134,12 @@ static void __nmk_gpio_set_mode_safe(struct nmk_gpio_chip *nmk_chip,
unsigned offset, int gpio_mode,
bool glitch)
{
- u32 rwimsc;
- u32 fwimsc;
+ u32 rwimsc = readl(nmk_chip->addr + NMK_GPIO_RWIMSC);
+ u32 fwimsc = readl(nmk_chip->addr + NMK_GPIO_FWIMSC);
if (glitch && nmk_chip->set_ioforce) {
u32 bit = BIT(offset);
- rwimsc = readl(nmk_chip->addr + NMK_GPIO_RWIMSC);
- fwimsc = readl(nmk_chip->addr + NMK_GPIO_FWIMSC);
-
/* Prevent spurious wakeups */
writel(rwimsc & ~bit, nmk_chip->addr + NMK_GPIO_RWIMSC);
writel(fwimsc & ~bit, nmk_chip->addr + NMK_GPIO_FWIMSC);