pinctrl: tb10x: Use devm_pinctrl_register() for pinctrl registration
authorLaxman Dewangan <ldewangan@nvidia.com>
Wed, 24 Feb 2016 09:14:07 +0000 (14:44 +0530)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 21 Apr 2016 07:23:25 +0000 (09:23 +0200)
Use devm_pinctrl_register() for pin control registration.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-tb10x.c

index 620af57f10ad92afb4cc1cb66c18051f25646577..edfba506e95825fe450f97280d5de066fa654e67 100644 (file)
@@ -806,7 +806,7 @@ static int tb10x_pinctrl_probe(struct platform_device *pdev)
                }
        }
 
-       state->pctl = pinctrl_register(&tb10x_pindesc, dev, state);
+       state->pctl = devm_pinctrl_register(dev, &tb10x_pindesc, state);
        if (IS_ERR(state->pctl)) {
                dev_err(dev, "could not register TB10x pin driver\n");
                ret = PTR_ERR(state->pctl);
@@ -824,7 +824,6 @@ static int tb10x_pinctrl_remove(struct platform_device *pdev)
 {
        struct tb10x_pinctrl *state = platform_get_drvdata(pdev);
 
-       pinctrl_unregister(state->pctl);
        mutex_destroy(&state->mutex);
 
        return 0;
This page took 0.038343 seconds and 5 git commands to generate.