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 09:23:23 +0200 |
commit | 5039d27203aac887fa7bf0110e68aa6581c5a902 (patch) | |
tree | fe9a5d153228d45ba821474406e3bffc73763842 /drivers/pinctrl | |
parent | 19ba900bd28422e8a986e3fc2c5dda0a2054315a (diff) | |
download | op-kernel-dev-5039d27203aac887fa7bf0110e68aa6581c5a902.zip op-kernel-dev-5039d27203aac887fa7bf0110e68aa6581c5a902.tar.gz |
pinctrl: palmas: 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')
-rw-r--r-- | drivers/pinctrl/pinctrl-palmas.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/pinctrl/pinctrl-palmas.c b/drivers/pinctrl/pinctrl-palmas.c index 8f0163f..8edb3f8c 100644 --- a/drivers/pinctrl/pinctrl-palmas.c +++ b/drivers/pinctrl/pinctrl-palmas.c @@ -1043,7 +1043,8 @@ static int palmas_pinctrl_probe(struct platform_device *pdev) palmas_pinctrl_desc.name = dev_name(&pdev->dev); palmas_pinctrl_desc.pins = palmas_pins_desc; palmas_pinctrl_desc.npins = ARRAY_SIZE(palmas_pins_desc); - pci->pctl = pinctrl_register(&palmas_pinctrl_desc, &pdev->dev, pci); + pci->pctl = devm_pinctrl_register(&pdev->dev, &palmas_pinctrl_desc, + pci); if (IS_ERR(pci->pctl)) { dev_err(&pdev->dev, "Couldn't register pinctrl driver\n"); return PTR_ERR(pci->pctl); @@ -1051,21 +1052,12 @@ static int palmas_pinctrl_probe(struct platform_device *pdev) return 0; } -static int palmas_pinctrl_remove(struct platform_device *pdev) -{ - struct palmas_pctrl_chip_info *pci = platform_get_drvdata(pdev); - - pinctrl_unregister(pci->pctl); - return 0; -} - static struct platform_driver palmas_pinctrl_driver = { .driver = { .name = "palmas-pinctrl", .of_match_table = palmas_pinctrl_of_match, }, .probe = palmas_pinctrl_probe, - .remove = palmas_pinctrl_remove, }; module_platform_driver(palmas_pinctrl_driver); |