summaryrefslogtreecommitdiff
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2016-05-23 11:00:37 +0200
committerLinus Walleij <linus.walleij@linaro.org>2016-06-07 09:37:21 +0200
commit86ede3d41b56f98fb5923a127d08857309b35524 (patch)
tree996b41bf070c8a9c54031cb927ef00dec01d8709 /drivers/pinctrl
parent8c7a92dad1621f38d1ff4fe9eaac898d6f33a0a3 (diff)
pinctrl: xway: use devm_gpiochip_add_data()
Avoid a gpiochip_free() and use standard functions. Cc: John Crispin <blogic@openwrt.org> Cc: Pramod Gurav <pramod.gurav@smartplayin.com> Cc: Martin Schiller <mschiller@tdt.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/pinctrl-xway.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/pinctrl/pinctrl-xway.c b/drivers/pinctrl/pinctrl-xway.c
index a13f2b6f6fc0..b9375544dff0 100644
--- a/drivers/pinctrl/pinctrl-xway.c
+++ b/drivers/pinctrl/pinctrl-xway.c
@@ -1724,9 +1724,9 @@ static int pinmux_xway_probe(struct platform_device *pdev)
}
xway_pctrl_desc.pins = xway_info.pads;
- /* load the gpio chip */
+ /* register the gpio chip */
xway_chip.parent = &pdev->dev;
- ret = gpiochip_add(&xway_chip);
+ ret = devm_gpiochip_add_data(&pdev->dev, &xway_chip, NULL);
if (ret) {
dev_err(&pdev->dev, "Failed to register gpio chip\n");
return ret;
@@ -1749,7 +1749,6 @@ static int pinmux_xway_probe(struct platform_device *pdev)
/* register with the generic lantiq layer */
ret = ltq_pinctrl_register(pdev, &xway_info);
if (ret) {
- gpiochip_remove(&xway_chip);
dev_err(&pdev->dev, "Failed to register pinctrl driver\n");
return ret;
}