Commit efa3ffcd authored by Laxman Dewangan's avatar Laxman Dewangan

gpio: lynxpoint: 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 69c0a0a5
...@@ -370,7 +370,7 @@ static int lp_gpio_probe(struct platform_device *pdev) ...@@ -370,7 +370,7 @@ static int lp_gpio_probe(struct platform_device *pdev)
gc->can_sleep = false; gc->can_sleep = false;
gc->parent = dev; gc->parent = dev;
ret = gpiochip_add_data(gc, lg); ret = devm_gpiochip_add_data(dev, gc, lg);
if (ret) { if (ret) {
dev_err(dev, "failed adding lp-gpio chip\n"); dev_err(dev, "failed adding lp-gpio chip\n");
return ret; return ret;
...@@ -439,9 +439,7 @@ MODULE_DEVICE_TABLE(acpi, lynxpoint_gpio_acpi_match); ...@@ -439,9 +439,7 @@ MODULE_DEVICE_TABLE(acpi, lynxpoint_gpio_acpi_match);
static int lp_gpio_remove(struct platform_device *pdev) static int lp_gpio_remove(struct platform_device *pdev)
{ {
struct lp_gpio *lg = platform_get_drvdata(pdev);
pm_runtime_disable(&pdev->dev); pm_runtime_disable(&pdev->dev);
gpiochip_remove(&lg->chip);
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