summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-janz-ttl.c
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2016-02-22 15:13:28 +0300
committerLaxman Dewangan <ldewangan@nvidia.com>2016-02-23 18:05:33 +0300
commitabeb3f40295f5631053b73c1e5c03c00b8890e57 (patch)
tree2bb98be504452d273117309fb9d3bb7425575fe1 /drivers/gpio/gpio-janz-ttl.c
parent0c638759bf92bab251fb1a1999f5deff3423d7ab (diff)
downloadlinux-abeb3f40295f5631053b73c1e5c03c00b8890e57.tar.xz
gpio: janz-ttl: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and remove the need of driver callback .remove. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Diffstat (limited to 'drivers/gpio/gpio-janz-ttl.c')
-rw-r--r--drivers/gpio/gpio-janz-ttl.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/gpio/gpio-janz-ttl.c b/drivers/gpio/gpio-janz-ttl.c
index 482aa0353868..a8d0a6b8025a 100644
--- a/drivers/gpio/gpio-janz-ttl.c
+++ b/drivers/gpio/gpio-janz-ttl.c
@@ -182,7 +182,7 @@ static int ttl_probe(struct platform_device *pdev)
gpio->base = -1;
gpio->ngpio = 20;
- ret = gpiochip_add_data(gpio, NULL);
+ ret = devm_gpiochip_add_data(dev, gpio, NULL);
if (ret) {
dev_err(dev, "unable to add GPIO chip\n");
return ret;
@@ -191,21 +191,11 @@ static int ttl_probe(struct platform_device *pdev)
return 0;
}
-static int ttl_remove(struct platform_device *pdev)
-{
- struct ttl_module *mod = platform_get_drvdata(pdev);
-
- gpiochip_remove(&mod->gpio);
-
- return 0;
-}
-
static struct platform_driver ttl_driver = {
.driver = {
.name = DRV_NAME,
},
.probe = ttl_probe,
- .remove = ttl_remove,
};
module_platform_driver(ttl_driver);