Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 985d8d5c authored by Vladimir Zapolskiy's avatar Vladimir Zapolskiy Committed by Linus Walleij
Browse files

gpio: lpc18xx: use resource managed interface to register GPIO controller



Slightly simplify deregistration of the GPIO controller driver.

Signed-off-by: default avatarVladimir Zapolskiy <vz@mleia.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 9dd1a30c
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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;