aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinctrl-st.c
diff options
context:
space:
mode:
authorMaxime COQUELIN <maxime.coquelin@st.com>2014-04-08 11:21:48 -0400
committerLinus Walleij <linus.walleij@linaro.org>2014-04-22 02:41:35 -0400
commita4bc1f57fd911424a2b6101e096c43d2b8a82e7f (patch)
treef9c9aef258180231d472ec3d8943c5f85779a594 /drivers/pinctrl/pinctrl-st.c
parentedb052c3c2ed36cf7f66b92fb1adda847599b5a7 (diff)
pinctrl: st: Use const qualifier when required
This patch adds const qualifier where applicable. Reported-by: Joe Perches <joe@perches.com> Signed-off-by: Maxime Coquelin <maxime.coquelin@st.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-st.c')
-rw-r--r--drivers/pinctrl/pinctrl-st.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c
index 987099c04bc6..ac48557df2a4 100644
--- a/drivers/pinctrl/pinctrl-st.c
+++ b/drivers/pinctrl/pinctrl-st.c
@@ -238,13 +238,13 @@ struct st_pio_control {
238}; 238};
239 239
240struct st_pctl_data { 240struct st_pctl_data {
241 enum st_retime_style rt_style; 241 const enum st_retime_style rt_style;
242 unsigned int *input_delays; 242 const unsigned int *input_delays;
243 int ninput_delays; 243 const int ninput_delays;
244 unsigned int *output_delays; 244 const unsigned int *output_delays;
245 int noutput_delays; 245 const int noutput_delays;
246 /* register offset information */ 246 /* register offset information */
247 int alt, oe, pu, od, rt; 247 const int alt, oe, pu, od, rt;
248}; 248};
249 249
250struct st_pinconf { 250struct st_pinconf {
@@ -337,8 +337,8 @@ struct st_pinctrl {
337 337
338/* SOC specific data */ 338/* SOC specific data */
339/* STiH415 data */ 339/* STiH415 data */
340static unsigned int stih415_input_delays[] = {0, 500, 1000, 1500}; 340static const unsigned int stih415_input_delays[] = {0, 500, 1000, 1500};
341static unsigned int stih415_output_delays[] = {0, 1000, 2000, 3000}; 341static const unsigned int stih415_output_delays[] = {0, 1000, 2000, 3000};
342 342
343#define STIH415_PCTRL_COMMON_DATA \ 343#define STIH415_PCTRL_COMMON_DATA \
344 .rt_style = st_retime_style_packed, \ 344 .rt_style = st_retime_style_packed, \
@@ -373,8 +373,8 @@ static const struct st_pctl_data stih415_right_data = {
373}; 373};
374 374
375/* STiH416 data */ 375/* STiH416 data */
376static unsigned int stih416_delays[] = {0, 300, 500, 750, 1000, 1250, 1500, 376static const unsigned int stih416_delays[] = {0, 300, 500, 750, 1000, 1250,
377 1750, 2000, 2250, 2500, 2750, 3000, 3250 }; 377 1500, 1750, 2000, 2250, 2500, 2750, 3000, 3250 };
378 378
379static const struct st_pctl_data stih416_data = { 379static const struct st_pctl_data stih416_data = {
380 .rt_style = st_retime_style_dedicated, 380 .rt_style = st_retime_style_dedicated,
@@ -463,7 +463,7 @@ static void st_pctl_set_function(struct st_pio_control *pc,
463static unsigned long st_pinconf_delay_to_bit(unsigned int delay, 463static unsigned long st_pinconf_delay_to_bit(unsigned int delay,
464 const struct st_pctl_data *data, unsigned long config) 464 const struct st_pctl_data *data, unsigned long config)
465{ 465{
466 unsigned int *delay_times; 466 const unsigned int *delay_times;
467 int num_delay_times, i, closest_index = -1; 467 int num_delay_times, i, closest_index = -1;
468 unsigned int closest_divergence = UINT_MAX; 468 unsigned int closest_divergence = UINT_MAX;
469 469
@@ -496,7 +496,7 @@ static unsigned long st_pinconf_delay_to_bit(unsigned int delay,
496static unsigned long st_pinconf_bit_to_delay(unsigned int index, 496static unsigned long st_pinconf_bit_to_delay(unsigned int index,
497 const struct st_pctl_data *data, unsigned long output) 497 const struct st_pctl_data *data, unsigned long output)
498{ 498{
499 unsigned int *delay_times; 499 const unsigned int *delay_times;
500 int num_delay_times; 500 int num_delay_times;
501 501
502 if (output) { 502 if (output) {