Commit 43fad832 authored by Laxman Dewangan's avatar Laxman Dewangan

gpio: timberdale Use devm_gpiochip_add_data() for gpio registration

Use devm_gpiochip_add_data() for GPIO registration.
Signed-off-by: default avatarLaxman Dewangan <ldewangan@nvidia.com>
parent 8b4acf3a
...@@ -279,7 +279,7 @@ static int timbgpio_probe(struct platform_device *pdev) ...@@ -279,7 +279,7 @@ static int timbgpio_probe(struct platform_device *pdev)
gc->ngpio = pdata->nr_pins; gc->ngpio = pdata->nr_pins;
gc->can_sleep = false; gc->can_sleep = false;
err = gpiochip_add_data(gc, tgpio); err = devm_gpiochip_add_data(&pdev->dev, gc, tgpio);
if (err) if (err)
return err; return err;
...@@ -320,8 +320,6 @@ static int timbgpio_remove(struct platform_device *pdev) ...@@ -320,8 +320,6 @@ static int timbgpio_remove(struct platform_device *pdev)
irq_set_handler_data(irq, NULL); irq_set_handler_data(irq, NULL);
} }
gpiochip_remove(&tgpio->gpio);
return 0; return 0;
} }
......
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