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:18 +0200 |
commit | d39de3139180ff90d43a5f4093ada4b31af40e9d (patch) | |
tree | b867a740ec573c01f580a12d7a75f122c17ea50e /drivers/pinctrl/spear/pinctrl-spear.c | |
parent | 67ec8d7b484639040b7a75b289a2a1d1763e3430 (diff) | |
download | op-kernel-dev-d39de3139180ff90d43a5f4093ada4b31af40e9d.zip op-kernel-dev-d39de3139180ff90d43a5f4093ada4b31af40e9d.tar.gz |
pinctrl: spear: Use devm_pinctrl_register() for pinctrl registration
Use devm_pinctrl_register() for pin control registration and remove
need of .remove callback.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Viresh Kumar <vireshk@kernel.org>
Cc: spear-devel@list.st.com
Cc: linux-arm-kernel@lists.infradead.org
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/spear/pinctrl-spear.c')
-rw-r--r-- | drivers/pinctrl/spear/pinctrl-spear.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/pinctrl/spear/pinctrl-spear.c b/drivers/pinctrl/spear/pinctrl-spear.c index 0afaf79..4db52ba 100644 --- a/drivers/pinctrl/spear/pinctrl-spear.c +++ b/drivers/pinctrl/spear/pinctrl-spear.c @@ -395,7 +395,7 @@ int spear_pinctrl_probe(struct platform_device *pdev, spear_pinctrl_desc.pins = machdata->pins; spear_pinctrl_desc.npins = machdata->npins; - pmx->pctl = pinctrl_register(&spear_pinctrl_desc, &pdev->dev, pmx); + pmx->pctl = devm_pinctrl_register(&pdev->dev, &spear_pinctrl_desc, pmx); if (IS_ERR(pmx->pctl)) { dev_err(&pdev->dev, "Couldn't register pinctrl driver\n"); return PTR_ERR(pmx->pctl); @@ -403,12 +403,3 @@ int spear_pinctrl_probe(struct platform_device *pdev, return 0; } - -int spear_pinctrl_remove(struct platform_device *pdev) -{ - struct spear_pmx *pmx = platform_get_drvdata(pdev); - - pinctrl_unregister(pmx->pctl); - - return 0; -} |