diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2016-02-24 14:44:07 +0530 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-04-21 00:03:21 +0200 |
commit | 88edad04d9bc0f87e44d5a44f438a399c31432ba (patch) | |
tree | 47a3a18aa5ff94e435976bdcbdf25d1a293d48e4 /drivers/pinctrl/stm32 | |
parent | d39de3139180ff90d43a5f4093ada4b31af40e9d (diff) |
pinctrl: stm32: Use devm_pinctrl_register() for pinctrl registration
Use devm_pinctrl_register() for pin control registration.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
Acked-by: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/stm32')
-rw-r--r-- | drivers/pinctrl/stm32/pinctrl-stm32.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/pinctrl/stm32/pinctrl-stm32.c b/drivers/pinctrl/stm32/pinctrl-stm32.c index b97b7c01f942..72b790450118 100644 --- a/drivers/pinctrl/stm32/pinctrl-stm32.c +++ b/drivers/pinctrl/stm32/pinctrl-stm32.c @@ -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++) |