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>
This commit is contained in:
Linus Walleij 2011-02-16 10:37:52 +01:00
parent 5317e4d11d
commit 3c4bee04d1
1 changed files with 2 additions and 5 deletions

View File

@ -134,15 +134,12 @@ static void __nmk_gpio_set_mode_safe(struct nmk_gpio_chip *nmk_chip,
unsigned offset, int gpio_mode, unsigned offset, int gpio_mode,
bool glitch) bool glitch)
{ {
u32 rwimsc; u32 rwimsc = readl(nmk_chip->addr + NMK_GPIO_RWIMSC);
u32 fwimsc; u32 fwimsc = readl(nmk_chip->addr + NMK_GPIO_FWIMSC);
if (glitch && nmk_chip->set_ioforce) { if (glitch && nmk_chip->set_ioforce) {
u32 bit = BIT(offset); u32 bit = BIT(offset);
rwimsc = readl(nmk_chip->addr + NMK_GPIO_RWIMSC);
fwimsc = readl(nmk_chip->addr + NMK_GPIO_FWIMSC);
/* Prevent spurious wakeups */ /* Prevent spurious wakeups */
writel(rwimsc & ~bit, nmk_chip->addr + NMK_GPIO_RWIMSC); writel(rwimsc & ~bit, nmk_chip->addr + NMK_GPIO_RWIMSC);
writel(fwimsc & ~bit, nmk_chip->addr + NMK_GPIO_FWIMSC); writel(fwimsc & ~bit, nmk_chip->addr + NMK_GPIO_FWIMSC);