Commit ce1bb7af authored by WANG Cong's avatar WANG Cong Committed by Linus Torvalds

cris: fix some build warnings in pinmux.c

Fix some harmless warnings such as

  arch/cris/arch-v32/mach-a3/pinmux.c:273: warning: ISO C90 forbids mixed declarations and code:
Signed-off-by: default avatarWANG Cong <xiyou.wangcong@gmail.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent b7de1100
...@@ -85,6 +85,8 @@ crisv32_pinmux_alloc_fixed(enum fixed_function function) ...@@ -85,6 +85,8 @@ crisv32_pinmux_alloc_fixed(enum fixed_function function)
int ret = -EINVAL; int ret = -EINVAL;
char saved[sizeof pins]; char saved[sizeof pins];
unsigned long flags; unsigned long flags;
reg_pinmux_rw_hwprot hwprot;
reg_clkgen_rw_clk_ctrl clk_ctrl;
spin_lock_irqsave(&pinmux_lock, flags); spin_lock_irqsave(&pinmux_lock, flags);
...@@ -93,9 +95,8 @@ crisv32_pinmux_alloc_fixed(enum fixed_function function) ...@@ -93,9 +95,8 @@ crisv32_pinmux_alloc_fixed(enum fixed_function function)
crisv32_pinmux_init(); /* must be done before we read rw_hwprot */ crisv32_pinmux_init(); /* must be done before we read rw_hwprot */
reg_pinmux_rw_hwprot hwprot = REG_RD(pinmux, regi_pinmux, rw_hwprot); hwprot = REG_RD(pinmux, regi_pinmux, rw_hwprot);
reg_clkgen_rw_clk_ctrl clk_ctrl = REG_RD(clkgen, regi_clkgen, clk_ctrl = REG_RD(clkgen, regi_clkgen, rw_clk_ctrl);
rw_clk_ctrl);
switch (function) { switch (function) {
case pinmux_eth: case pinmux_eth:
...@@ -262,6 +263,7 @@ crisv32_pinmux_dealloc_fixed(enum fixed_function function) ...@@ -262,6 +263,7 @@ crisv32_pinmux_dealloc_fixed(enum fixed_function function)
int ret = -EINVAL; int ret = -EINVAL;
char saved[sizeof pins]; char saved[sizeof pins];
unsigned long flags; unsigned long flags;
reg_pinmux_rw_hwprot hwprot;
spin_lock_irqsave(&pinmux_lock, flags); spin_lock_irqsave(&pinmux_lock, flags);
...@@ -270,7 +272,7 @@ crisv32_pinmux_dealloc_fixed(enum fixed_function function) ...@@ -270,7 +272,7 @@ crisv32_pinmux_dealloc_fixed(enum fixed_function function)
crisv32_pinmux_init(); /* must be done before we read rw_hwprot */ crisv32_pinmux_init(); /* must be done before we read rw_hwprot */
reg_pinmux_rw_hwprot hwprot = REG_RD(pinmux, regi_pinmux, rw_hwprot); hwprot = REG_RD(pinmux, regi_pinmux, rw_hwprot);
switch (function) { switch (function) {
case pinmux_eth: case pinmux_eth:
......
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