diff options
author | Vladimir Zapolskiy <vz@mleia.com> | 2018-11-29 00:28:48 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2018-12-07 10:49:46 +0100 |
commit | 985d8d5c76dcdc8f4c8ceea8fae71e4a45a0a200 (patch) | |
tree | 5b8a0c35151de20fbc8c3fd98f39c3fbced18e71 /drivers/gpio | |
parent | 9dd1a30cb4881328ae568f6c060446b52539a2dd (diff) | |
download | linux-985d8d5c76dcdc8f4c8ceea8fae71e4a45a0a200.tar.bz2 |
gpio: lpc18xx: use resource managed interface to register GPIO controller
Slightly simplify deregistration of the GPIO controller driver.
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpio-lpc18xx.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-lpc18xx.c b/drivers/gpio/gpio-lpc18xx.c index 52246221328b..dc33185a89b1 100644 --- a/drivers/gpio/gpio-lpc18xx.c +++ b/drivers/gpio/gpio-lpc18xx.c @@ -122,7 +122,7 @@ static int lpc18xx_gpio_probe(struct platform_device *pdev) gc->gpio.parent = dev; - ret = gpiochip_add_data(&gc->gpio, gc); + ret = devm_gpiochip_add_data(dev, &gc->gpio, gc); if (ret) { dev_err(dev, "failed to add gpio chip\n"); clk_disable_unprepare(gc->clk); @@ -136,7 +136,6 @@ static int lpc18xx_gpio_remove(struct platform_device *pdev) { struct lpc18xx_gpio_chip *gc = platform_get_drvdata(pdev); - gpiochip_remove(&gc->gpio); clk_disable_unprepare(gc->clk); return 0; |