diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2016-02-24 12:14:07 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-04-21 10:23:26 +0300 |
commit | 00b881b07dee87746dc1363ed9fee96f5b2af8d9 (patch) | |
tree | fa83aeb41dc0c05a005c0a13a070d7c4a82e636b /drivers/pinctrl/pinctrl-tz1090-pdc.c | |
parent | c3a6d9e0a37df77079f55c48901487fa9e731647 (diff) | |
download | linux-00b881b07dee87746dc1363ed9fee96f5b2af8d9.tar.xz |
pinctrl: tz1090-pdc: Use devm_pinctrl_register() for pinctrl registration
Use devm_pinctrl_register() for pin control registration and
remove the need of .remove callback.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-tz1090-pdc.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-tz1090-pdc.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/pinctrl/pinctrl-tz1090-pdc.c b/drivers/pinctrl/pinctrl-tz1090-pdc.c index b89ad3c0c731..e70e36283b3b 100644 --- a/drivers/pinctrl/pinctrl-tz1090-pdc.c +++ b/drivers/pinctrl/pinctrl-tz1090-pdc.c @@ -947,7 +947,8 @@ static int tz1090_pdc_pinctrl_probe(struct platform_device *pdev) if (IS_ERR(pmx->regs)) return PTR_ERR(pmx->regs); - pmx->pctl = pinctrl_register(&tz1090_pdc_pinctrl_desc, &pdev->dev, pmx); + pmx->pctl = devm_pinctrl_register(&pdev->dev, &tz1090_pdc_pinctrl_desc, + pmx); if (IS_ERR(pmx->pctl)) { dev_err(&pdev->dev, "Couldn't register pinctrl driver\n"); return PTR_ERR(pmx->pctl); @@ -960,15 +961,6 @@ static int tz1090_pdc_pinctrl_probe(struct platform_device *pdev) return 0; } -static int tz1090_pdc_pinctrl_remove(struct platform_device *pdev) -{ - struct tz1090_pdc_pmx *pmx = platform_get_drvdata(pdev); - - pinctrl_unregister(pmx->pctl); - - return 0; -} - static const struct of_device_id tz1090_pdc_pinctrl_of_match[] = { { .compatible = "img,tz1090-pdc-pinctrl", }, { }, @@ -980,7 +972,6 @@ static struct platform_driver tz1090_pdc_pinctrl_driver = { .of_match_table = tz1090_pdc_pinctrl_of_match, }, .probe = tz1090_pdc_pinctrl_probe, - .remove = tz1090_pdc_pinctrl_remove, }; static int __init tz1090_pdc_pinctrl_init(void) |