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>
This commit is contained in:
parent
c400f7a26f
commit
c3008735fc
2 changed files with 5 additions and 5 deletions
|
@ -44,9 +44,11 @@ static unsigned long mxc_pin_alloc_map[NB_PORTS * 32 / BITS_PER_LONG];
|
||||||
/*
|
/*
|
||||||
* set the mode for a IOMUX pin.
|
* set the mode for a IOMUX pin.
|
||||||
*/
|
*/
|
||||||
int mxc_iomux_mode(unsigned int pin_mode)
|
void mxc_iomux_mode(unsigned int pin_mode)
|
||||||
{
|
{
|
||||||
u32 field, l, mode, ret = 0;
|
u32 field;
|
||||||
|
u32 l;
|
||||||
|
u32 mode;
|
||||||
void __iomem *reg;
|
void __iomem *reg;
|
||||||
|
|
||||||
reg = IOMUXSW_MUX_CTL + (pin_mode & IOMUX_REG_MASK);
|
reg = IOMUXSW_MUX_CTL + (pin_mode & IOMUX_REG_MASK);
|
||||||
|
@ -61,8 +63,6 @@ int mxc_iomux_mode(unsigned int pin_mode)
|
||||||
__raw_writel(l, reg);
|
__raw_writel(l, reg);
|
||||||
|
|
||||||
spin_unlock(&gpio_mux_lock);
|
spin_unlock(&gpio_mux_lock);
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -144,7 +144,7 @@ void mxc_iomux_set_gpr(enum iomux_gp_func, bool en);
|
||||||
* It is called by the setup functions and should not be called directly anymore.
|
* It is called by the setup functions and should not be called directly anymore.
|
||||||
* It is here visible for backward compatibility
|
* It is here visible for backward compatibility
|
||||||
*/
|
*/
|
||||||
int mxc_iomux_mode(unsigned int pin_mode);
|
void mxc_iomux_mode(unsigned int pin_mode);
|
||||||
|
|
||||||
#define IOMUX_PADNUM_MASK 0x1ff
|
#define IOMUX_PADNUM_MASK 0x1ff
|
||||||
#define IOMUX_GPIONUM_SHIFT 9
|
#define IOMUX_GPIONUM_SHIFT 9
|
||||||
|
|
Loading…
Add table
Reference in a new issue