Commit 8b294504 authored by Linus Walleij's avatar Linus Walleij

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: default avatarUwe Kleine-König <>
Signed-off-by: default avatarLinus Walleij <>
parent acc14137
......@@ -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);
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 = {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment