Commit 8d8eb177 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Sascha Hauer

ARM: mxc91231/iomux: allow pin_list to be const

While at it remove some useless consts from unsigned int arguments.
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
parent 10a3c45c
...@@ -50,7 +50,7 @@ unsigned long mxc_pin_alloc_map[NB_PORTS * 32 / BITS_PER_LONG]; ...@@ -50,7 +50,7 @@ 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(const unsigned int pin_mode) int mxc_iomux_mode(unsigned int pin_mode)
{ {
u32 side, field, l, mode, ret = 0; u32 side, field, l, mode, ret = 0;
void __iomem *reg; void __iomem *reg;
...@@ -114,7 +114,7 @@ EXPORT_SYMBOL(mxc_iomux_set_pad); ...@@ -114,7 +114,7 @@ EXPORT_SYMBOL(mxc_iomux_set_pad);
* - reserves the pin so that it is not claimed by another driver * - reserves the pin so that it is not claimed by another driver
* - setups the iomux according to the configuration * - setups the iomux according to the configuration
*/ */
int mxc_iomux_alloc_pin(const unsigned int pin_mode, const char *label) int mxc_iomux_alloc_pin(unsigned int pin_mode, const char *label)
{ {
unsigned pad = PIN_GLOBAL_NUM(pin_mode); unsigned pad = PIN_GLOBAL_NUM(pin_mode);
if (pad >= (PIN_MAX + 1)) { if (pad >= (PIN_MAX + 1)) {
...@@ -134,10 +134,10 @@ int mxc_iomux_alloc_pin(const unsigned int pin_mode, const char *label) ...@@ -134,10 +134,10 @@ int mxc_iomux_alloc_pin(const unsigned int pin_mode, const char *label)
} }
EXPORT_SYMBOL(mxc_iomux_alloc_pin); EXPORT_SYMBOL(mxc_iomux_alloc_pin);
int mxc_iomux_setup_multiple_pins(unsigned int *pin_list, unsigned count, int mxc_iomux_setup_multiple_pins(const unsigned int *pin_list, unsigned count,
const char *label) const char *label)
{ {
unsigned int *p = pin_list; const unsigned int *p = pin_list;
int i; int i;
int ret = -EINVAL; int ret = -EINVAL;
...@@ -155,7 +155,7 @@ int mxc_iomux_setup_multiple_pins(unsigned int *pin_list, unsigned count, ...@@ -155,7 +155,7 @@ int mxc_iomux_setup_multiple_pins(unsigned int *pin_list, unsigned count,
} }
EXPORT_SYMBOL(mxc_iomux_setup_multiple_pins); EXPORT_SYMBOL(mxc_iomux_setup_multiple_pins);
void mxc_iomux_release_pin(const unsigned int pin_mode) void mxc_iomux_release_pin(unsigned int pin_mode)
{ {
unsigned pad = PIN_GLOBAL_NUM(pin_mode); unsigned pad = PIN_GLOBAL_NUM(pin_mode);
...@@ -164,9 +164,9 @@ void mxc_iomux_release_pin(const unsigned int pin_mode) ...@@ -164,9 +164,9 @@ void mxc_iomux_release_pin(const unsigned int pin_mode)
} }
EXPORT_SYMBOL(mxc_iomux_release_pin); EXPORT_SYMBOL(mxc_iomux_release_pin);
void mxc_iomux_release_multiple_pins(unsigned int *pin_list, int count) void mxc_iomux_release_multiple_pins(const unsigned int *pin_list, int count)
{ {
unsigned int *p = pin_list; const unsigned int *p = pin_list;
int i; int i;
for (i = 0; i < count; i++) { for (i = 0; i < count; i++) {
......
...@@ -46,12 +46,12 @@ ...@@ -46,12 +46,12 @@
* - setups the iomux according to the configuration * - setups the iomux according to the configuration
* - if the pin is configured as a GPIO, we claim it through kernel gpiolib * - if the pin is configured as a GPIO, we claim it through kernel gpiolib
*/ */
int mxc_iomux_alloc_pin(const unsigned int pin_mode, const char *label); int mxc_iomux_alloc_pin(unsigned int pin_mode, const char *label);
/* /*
* setups mutliple pins * setups mutliple pins
* convenient way to call the above function with tables * convenient way to call the above function with tables
*/ */
int mxc_iomux_setup_multiple_pins(unsigned int *pin_list, unsigned count, int mxc_iomux_setup_multiple_pins(const unsigned int *pin_list, unsigned count,
const char *label); const char *label);
/* /*
...@@ -60,12 +60,12 @@ int mxc_iomux_setup_multiple_pins(unsigned int *pin_list, unsigned count, ...@@ -60,12 +60,12 @@ int mxc_iomux_setup_multiple_pins(unsigned int *pin_list, unsigned count,
* - frees the GPIO if the pin was configured as GPIO * - frees the GPIO if the pin was configured as GPIO
* - DOES NOT reconfigure the IOMUX in its reset state * - DOES NOT reconfigure the IOMUX in its reset state
*/ */
void mxc_iomux_release_pin(const unsigned int pin_mode); void mxc_iomux_release_pin(unsigned int pin_mode);
/* /*
* releases multiple pins * releases multiple pins
* convenvient way to call the above function with tables * convenvient way to call the above function with tables
*/ */
void mxc_iomux_release_multiple_pins(unsigned int *pin_list, int count); void mxc_iomux_release_multiple_pins(const unsigned int *pin_list, int count);
#define MUX_SIDE_AP (0) #define MUX_SIDE_AP (0)
#define MUX_SIDE_SP (1) #define MUX_SIDE_SP (1)
......
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