pinctrl: nsp-gpio: 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>
Wed, 20 Apr 2016 22:02:09 +0000 (00:02 +0200)
Use devm_pinctrl_register() for pin control registration.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Ray Jui <rjui@broadcom.com>
Cc: Scott Branden <sbranden@broadcom.com>
Cc: Jon Mason <jonmason@broadcom.com>
Acked-by: Ray Jui <ray.jui@broadcom.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/bcm/pinctrl-nsp-gpio.c

index 6c7d5f500f354d6340d352da2d6b4982ff0bfc47..a8b37a9a82301a9d6b82e57a9f716416f0d60247 100644 (file)
@@ -609,7 +609,7 @@ static int nsp_gpio_register_pinconf(struct nsp_gpio *chip)
        pctldesc->npins = gc->ngpio;
        pctldesc->confops = &nsp_pconf_ops;
 
-       chip->pctl = pinctrl_register(pctldesc, chip->dev, chip);
+       chip->pctl = devm_pinctrl_register(chip->dev, pctldesc, chip);
        if (IS_ERR(chip->pctl)) {
                dev_err(chip->dev, "unable to register pinctrl device\n");
                return PTR_ERR(chip->pctl);