aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinctrl-mxs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pinctrl/pinctrl-mxs.c')
-rw-r--r--drivers/pinctrl/pinctrl-mxs.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/drivers/pinctrl/pinctrl-mxs.c b/drivers/pinctrl/pinctrl-mxs.c
index 180f16379ec1..23af9f1f9c35 100644
--- a/drivers/pinctrl/pinctrl-mxs.c
+++ b/drivers/pinctrl/pinctrl-mxs.c
@@ -146,7 +146,7 @@ free:
146static void mxs_dt_free_map(struct pinctrl_dev *pctldev, 146static void mxs_dt_free_map(struct pinctrl_dev *pctldev,
147 struct pinctrl_map *map, unsigned num_maps) 147 struct pinctrl_map *map, unsigned num_maps)
148{ 148{
149 int i; 149 u32 i;
150 150
151 for (i = 0; i < num_maps; i++) { 151 for (i = 0; i < num_maps; i++) {
152 if (map[i].type == PIN_MAP_TYPE_MUX_GROUP) 152 if (map[i].type == PIN_MAP_TYPE_MUX_GROUP)
@@ -203,7 +203,7 @@ static int mxs_pinctrl_enable(struct pinctrl_dev *pctldev, unsigned selector,
203 void __iomem *reg; 203 void __iomem *reg;
204 u8 bank, shift; 204 u8 bank, shift;
205 u16 pin; 205 u16 pin;
206 int i; 206 u32 i;
207 207
208 for (i = 0; i < g->npins; i++) { 208 for (i = 0; i < g->npins; i++) {
209 bank = PINID_TO_BANK(g->pins[i]); 209 bank = PINID_TO_BANK(g->pins[i]);
@@ -256,7 +256,7 @@ static int mxs_pinconf_group_set(struct pinctrl_dev *pctldev,
256 void __iomem *reg; 256 void __iomem *reg;
257 u8 ma, vol, pull, bank, shift; 257 u8 ma, vol, pull, bank, shift;
258 u16 pin; 258 u16 pin;
259 int i; 259 u32 i;
260 260
261 ma = CONFIG_TO_MA(config); 261 ma = CONFIG_TO_MA(config);
262 vol = CONFIG_TO_VOL(config); 262 vol = CONFIG_TO_VOL(config);
@@ -335,9 +335,9 @@ static struct pinctrl_desc mxs_pinctrl_desc = {
335 .owner = THIS_MODULE, 335 .owner = THIS_MODULE,
336}; 336};
337 337
338static int __devinit mxs_pinctrl_parse_group(struct platform_device *pdev, 338static int mxs_pinctrl_parse_group(struct platform_device *pdev,
339 struct device_node *np, int idx, 339 struct device_node *np, int idx,
340 const char **out_name) 340 const char **out_name)
341{ 341{
342 struct mxs_pinctrl_data *d = platform_get_drvdata(pdev); 342 struct mxs_pinctrl_data *d = platform_get_drvdata(pdev);
343 struct mxs_group *g = &d->soc->groups[idx]; 343 struct mxs_group *g = &d->soc->groups[idx];
@@ -345,8 +345,7 @@ static int __devinit mxs_pinctrl_parse_group(struct platform_device *pdev,
345 const char *propname = "fsl,pinmux-ids"; 345 const char *propname = "fsl,pinmux-ids";
346 char *group; 346 char *group;
347 int length = strlen(np->name) + SUFFIX_LEN; 347 int length = strlen(np->name) + SUFFIX_LEN;
348 int i; 348 u32 val, i;
349 u32 val;
350 349
351 group = devm_kzalloc(&pdev->dev, length, GFP_KERNEL); 350 group = devm_kzalloc(&pdev->dev, length, GFP_KERNEL);
352 if (!group) 351 if (!group)
@@ -384,8 +383,8 @@ static int __devinit mxs_pinctrl_parse_group(struct platform_device *pdev,
384 return 0; 383 return 0;
385} 384}
386 385
387static int __devinit mxs_pinctrl_probe_dt(struct platform_device *pdev, 386static int mxs_pinctrl_probe_dt(struct platform_device *pdev,
388 struct mxs_pinctrl_data *d) 387 struct mxs_pinctrl_data *d)
389{ 388{
390 struct mxs_pinctrl_soc_data *soc = d->soc; 389 struct mxs_pinctrl_soc_data *soc = d->soc;
391 struct device_node *np = pdev->dev.of_node; 390 struct device_node *np = pdev->dev.of_node;
@@ -476,8 +475,8 @@ static int __devinit mxs_pinctrl_probe_dt(struct platform_device *pdev,
476 return 0; 475 return 0;
477} 476}
478 477
479int __devinit mxs_pinctrl_probe(struct platform_device *pdev, 478int mxs_pinctrl_probe(struct platform_device *pdev,
480 struct mxs_pinctrl_soc_data *soc) 479 struct mxs_pinctrl_soc_data *soc)
481{ 480{
482 struct device_node *np = pdev->dev.of_node; 481 struct device_node *np = pdev->dev.of_node;
483 struct mxs_pinctrl_data *d; 482 struct mxs_pinctrl_data *d;