mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
pinctrl: stm32: Use devm_pinctrl_register() for pinctrl registration
Use devm_pinctrl_register() for pin control registration. Signed-off-by: Laxman Dewangan <[email protected]> Cc: Maxime Coquelin <[email protected]> Cc: Patrice Chotard <[email protected]> Acked-by: Maxime Coquelin <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
parent
d39de31391
commit
88edad04d9
1 changed files with 4 additions and 3 deletions
|
|
@ -813,10 +813,11 @@ int stm32_pctl_probe(struct platform_device *pdev)
|
|||
pctl->pctl_desc.pmxops = &stm32_pmx_ops;
|
||||
pctl->dev = &pdev->dev;
|
||||
|
||||
pctl->pctl_dev = pinctrl_register(&pctl->pctl_desc, &pdev->dev, pctl);
|
||||
if (!pctl->pctl_dev) {
|
||||
pctl->pctl_dev = devm_pinctrl_register(&pdev->dev, &pctl->pctl_desc,
|
||||
pctl);
|
||||
if (IS_ERR(pctl->pctl_dev)) {
|
||||
dev_err(&pdev->dev, "Failed pinctrl registration\n");
|
||||
return -EINVAL;
|
||||
return PTR_ERR(pctl->pctl_dev);
|
||||
}
|
||||
|
||||
for (i = 0; i < pctl->nbanks; i++)
|
||||
|
|
|
|||
Loading…
Reference in a new issue