summaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2019-06-26 10:23:28 +0200
committerLinus Walleij <linus.walleij@linaro.org>2019-07-03 10:24:02 +0200
commit8b29450437d7e3a507d8421621b02fcaa2368637 (patch)
treeb701772e79a024428da7fe85fba9e355162c259c /drivers/gpio
parentacc141374df40abd24ed5e128c8a3eb43805a688 (diff)
downloadlinux-stable-8b29450437d7e3a507d8421621b02fcaa2368637.tar.gz
linux-stable-8b29450437d7e3a507d8421621b02fcaa2368637.tar.bz2
linux-stable-8b29450437d7e3a507d8421621b02fcaa2368637.zip
gpio: siox: Use devm_ managed gpiochip
By using devm_gpiochip_add_data() we can get rid of the remove() callback. As this driver doesn't use the gpiochip data pointer we simply pass in NULL. Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-siox.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/gpio/gpio-siox.c b/drivers/gpio/gpio-siox.c
index c8cca30b2443..006a7e6a75f2 100644
--- a/drivers/gpio/gpio-siox.c
+++ b/drivers/gpio/gpio-siox.c
@@ -246,24 +246,15 @@ static int gpio_siox_probe(struct siox_device *sdevice)
girq->default_type = IRQ_TYPE_NONE;
girq->handler = handle_level_irq;
- ret = gpiochip_add(&ddata->gchip);
+ ret = devm_gpiochip_add_data(dev, &ddata->gchip, NULL);
if (ret)
dev_err(dev, "Failed to register gpio chip (%d)\n", ret);
return ret;
}
-static int gpio_siox_remove(struct siox_device *sdevice)
-{
- struct gpio_siox_ddata *ddata = dev_get_drvdata(&sdevice->dev);
-
- gpiochip_remove(&ddata->gchip);
- return 0;
-}
-
static struct siox_driver gpio_siox_driver = {
.probe = gpio_siox_probe,
- .remove = gpio_siox_remove,
.set_data = gpio_siox_set_data,
.get_data = gpio_siox_get_data,
.driver = {