aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx
diff options
context:
space:
mode:
authorDmitry Voytik <voytikd@gmail.com>2014-11-06 13:55:04 -0500
committerShawn Guo <shawn.guo@linaro.org>2014-11-21 18:39:36 -0500
commitc3008735fce9f9a0f92fd79d4e1f3969d6f33c9f (patch)
tree54a7771717223271c1ff282131be1098fd3fe553 /arch/arm/mach-imx
parentc400f7a26fa0fa8ea7268cef27f1ba980df54267 (diff)
ARM: imx: refactor mxc_iomux_mode()
Refactor mxc_iomux_mode(): - since it always returns 0 make it to return void - remove unnecessary ret variable - declare variables according to the kernel coding style Signed-off-by: Dmitry Voytik <voytikd@gmail.com> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r--arch/arm/mach-imx/iomux-imx31.c8
-rw-r--r--arch/arm/mach-imx/iomux-mx3.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm/mach-imx/iomux-imx31.c b/arch/arm/mach-imx/iomux-imx31.c
index 1657fe64cd0f..d6a30753ca7c 100644
--- a/arch/arm/mach-imx/iomux-imx31.c
+++ b/arch/arm/mach-imx/iomux-imx31.c
@@ -44,9 +44,11 @@ static unsigned long mxc_pin_alloc_map[NB_PORTS * 32 / BITS_PER_LONG];
44/* 44/*
45 * set the mode for a IOMUX pin. 45 * set the mode for a IOMUX pin.
46 */ 46 */
47int mxc_iomux_mode(unsigned int pin_mode) 47void mxc_iomux_mode(unsigned int pin_mode)
48{ 48{
49 u32 field, l, mode, ret = 0; 49 u32 field;
50 u32 l;
51 u32 mode;
50 void __iomem *reg; 52 void __iomem *reg;
51 53
52 reg = IOMUXSW_MUX_CTL + (pin_mode & IOMUX_REG_MASK); 54 reg = IOMUXSW_MUX_CTL + (pin_mode & IOMUX_REG_MASK);
@@ -61,8 +63,6 @@ int mxc_iomux_mode(unsigned int pin_mode)
61 __raw_writel(l, reg); 63 __raw_writel(l, reg);
62 64
63 spin_unlock(&gpio_mux_lock); 65 spin_unlock(&gpio_mux_lock);
64
65 return ret;
66} 66}
67 67
68/* 68/*
diff --git a/arch/arm/mach-imx/iomux-mx3.h b/arch/arm/mach-imx/iomux-mx3.h
index f79f78a1c0ed..0a5adba61e0b 100644
--- a/arch/arm/mach-imx/iomux-mx3.h
+++ b/arch/arm/mach-imx/iomux-mx3.h
@@ -144,7 +144,7 @@ void mxc_iomux_set_gpr(enum iomux_gp_func, bool en);
144 * It is called by the setup functions and should not be called directly anymore. 144 * It is called by the setup functions and should not be called directly anymore.
145 * It is here visible for backward compatibility 145 * It is here visible for backward compatibility
146 */ 146 */
147int mxc_iomux_mode(unsigned int pin_mode); 147void mxc_iomux_mode(unsigned int pin_mode);
148 148
149#define IOMUX_PADNUM_MASK 0x1ff 149#define IOMUX_PADNUM_MASK 0x1ff
150#define IOMUX_GPIONUM_SHIFT 9 150#define IOMUX_GPIONUM_SHIFT 9