summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2016-02-22 17:43:28 +0530
committerLaxman Dewangan <ldewangan@nvidia.com>2016-02-23 20:35:35 +0530
commitefa3ffcd98f39617a3962b93d88326bb76b42462 (patch)
tree1ad9c8a78742548c7c6b6e89e1f03bcf50496160
parent69c0a0a52cdecf2572165c7b35077cc4dd497bc5 (diff)
gpio: lynxpoint: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
-rw-r--r--drivers/gpio/gpio-lynxpoint.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpio/gpio-lynxpoint.c b/drivers/gpio/gpio-lynxpoint.c
index 13107772be4f..9df015e85ad9 100644
--- a/drivers/gpio/gpio-lynxpoint.c
+++ b/drivers/gpio/gpio-lynxpoint.c
@@ -370,7 +370,7 @@ static int lp_gpio_probe(struct platform_device *pdev)
gc->can_sleep = false;
gc->parent = dev;
- ret = gpiochip_add_data(gc, lg);
+ ret = devm_gpiochip_add_data(dev, gc, lg);
if (ret) {
dev_err(dev, "failed adding lp-gpio chip\n");
return ret;
@@ -439,9 +439,7 @@ MODULE_DEVICE_TABLE(acpi, lynxpoint_gpio_acpi_match);
static int lp_gpio_remove(struct platform_device *pdev)
{
- struct lp_gpio *lg = platform_get_drvdata(pdev);
pm_runtime_disable(&pdev->dev);
- gpiochip_remove(&lg->chip);
return 0;
}