diff options
author | Jesper Nilsson <jespern@axis.com> | 2015-06-03 06:25:51 -0400 |
---|---|---|
committer | Jesper Nilsson <jespern@axis.com> | 2015-09-04 18:33:25 -0400 |
commit | 94230178678cb7e0f82ff2c161ac84742f79a2e7 (patch) | |
tree | 1a2af81b87b723c1f98cc897afa1d183008c97fe /arch/cris/arch-v32 | |
parent | ee59843cd2b4331db49671c7f045ee2ff9d535b6 (diff) |
CRISv32: ETRAX FS: Squash warnings in pinmux driver
Squash the followng warnings
arch/cris/arch-v32/mach-fs/pinmux.c: In function 'crisv32_pinmux_alloc_fixed':
arch/cris/arch-v32/mach-fs/pinmux.c:104:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
arch/cris/arch-v32/mach-fs/pinmux.c: In function 'crisv32_pinmux_dealloc_fixed':
arch/cris/arch-v32/mach-fs/pinmux.c:238:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
arch/cris/arch-v32/mach-fs/pinmux.c: In function '__crisv32_pinmux_alloc':
arch/cris/arch-v32/mach-fs/pinmux.c:49:1: warning: control reaches end of non-void function [-Wreturn-type]
Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Diffstat (limited to 'arch/cris/arch-v32')
-rw-r--r-- | arch/cris/arch-v32/mach-fs/pinmux.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/cris/arch-v32/mach-fs/pinmux.c b/arch/cris/arch-v32/mach-fs/pinmux.c index 05a04708b8eb..d8a3a3c439dd 100644 --- a/arch/cris/arch-v32/mach-fs/pinmux.c +++ b/arch/cris/arch-v32/mach-fs/pinmux.c | |||
@@ -46,6 +46,8 @@ static int __crisv32_pinmux_alloc(int port, int first_pin, int last_pin, | |||
46 | pins[port][i] = mode; | 46 | pins[port][i] = mode; |
47 | 47 | ||
48 | crisv32_pinmux_set(port); | 48 | crisv32_pinmux_set(port); |
49 | |||
50 | return 0; | ||
49 | } | 51 | } |
50 | 52 | ||
51 | static int crisv32_pinmux_init(void) | 53 | static int crisv32_pinmux_init(void) |
@@ -93,6 +95,7 @@ int crisv32_pinmux_alloc_fixed(enum fixed_function function) | |||
93 | int ret = -EINVAL; | 95 | int ret = -EINVAL; |
94 | char saved[sizeof pins]; | 96 | char saved[sizeof pins]; |
95 | unsigned long flags; | 97 | unsigned long flags; |
98 | reg_pinmux_rw_hwprot hwprot; | ||
96 | 99 | ||
97 | spin_lock_irqsave(&pinmux_lock, flags); | 100 | spin_lock_irqsave(&pinmux_lock, flags); |
98 | 101 | ||
@@ -101,7 +104,7 @@ int crisv32_pinmux_alloc_fixed(enum fixed_function function) | |||
101 | 104 | ||
102 | crisv32_pinmux_init(); /* Must be done before we read rw_hwprot */ | 105 | crisv32_pinmux_init(); /* Must be done before we read rw_hwprot */ |
103 | 106 | ||
104 | reg_pinmux_rw_hwprot hwprot = REG_RD(pinmux, regi_pinmux, rw_hwprot); | 107 | hwprot = REG_RD(pinmux, regi_pinmux, rw_hwprot); |
105 | 108 | ||
106 | switch (function) { | 109 | switch (function) { |
107 | case pinmux_ser1: | 110 | case pinmux_ser1: |
@@ -227,6 +230,7 @@ int crisv32_pinmux_dealloc_fixed(enum fixed_function function) | |||
227 | int ret = -EINVAL; | 230 | int ret = -EINVAL; |
228 | char saved[sizeof pins]; | 231 | char saved[sizeof pins]; |
229 | unsigned long flags; | 232 | unsigned long flags; |
233 | reg_pinmux_rw_hwprot hwprot; | ||
230 | 234 | ||
231 | spin_lock_irqsave(&pinmux_lock, flags); | 235 | spin_lock_irqsave(&pinmux_lock, flags); |
232 | 236 | ||
@@ -235,7 +239,7 @@ int crisv32_pinmux_dealloc_fixed(enum fixed_function function) | |||
235 | 239 | ||
236 | crisv32_pinmux_init(); /* Must be done before we read rw_hwprot */ | 240 | crisv32_pinmux_init(); /* Must be done before we read rw_hwprot */ |
237 | 241 | ||
238 | reg_pinmux_rw_hwprot hwprot = REG_RD(pinmux, regi_pinmux, rw_hwprot); | 242 | hwprot = REG_RD(pinmux, regi_pinmux, rw_hwprot); |
239 | 243 | ||
240 | switch (function) { | 244 | switch (function) { |
241 | case pinmux_ser1: | 245 | case pinmux_ser1: |