diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2016-02-22 13:13:28 +0100 |
---|---|---|
committer | Laxman Dewangan <ldewangan@nvidia.com> | 2016-02-23 16:05:54 +0100 |
commit | 9d113c696f4081bf95dd7553d6369998a666b0fa (patch) | |
tree | 19861083120a4e40e9de2c3f321f530e44638f1a /drivers/gpio | |
parent | gpio: xgene-sb: Use devm_gpiochip_add_data() for gpio registration (diff) | |
download | linux-9d113c696f4081bf95dd7553d6369998a666b0fa.tar.xz linux-9d113c696f4081bf95dd7553d6369998a666b0fa.zip |
gpio: xgene: 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')
-rw-r--r-- | drivers/gpio/gpio-xgene.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/gpio/gpio-xgene.c b/drivers/gpio/gpio-xgene.c index 592e9cdf9c53..c0aa387664bf 100644 --- a/drivers/gpio/gpio-xgene.c +++ b/drivers/gpio/gpio-xgene.c @@ -193,7 +193,7 @@ static int xgene_gpio_probe(struct platform_device *pdev) platform_set_drvdata(pdev, gpio); - err = gpiochip_add_data(&gpio->chip, gpio); + err = devm_gpiochip_add_data(&pdev->dev, &gpio->chip, gpio); if (err) { dev_err(&pdev->dev, "failed to register gpiochip.\n"); @@ -207,14 +207,6 @@ err: return err; } -static int xgene_gpio_remove(struct platform_device *pdev) -{ - struct xgene_gpio *gpio = platform_get_drvdata(pdev); - - gpiochip_remove(&gpio->chip); - return 0; -} - static const struct of_device_id xgene_gpio_of_match[] = { { .compatible = "apm,xgene-gpio", }, {}, @@ -228,7 +220,6 @@ static struct platform_driver xgene_gpio_driver = { .pm = XGENE_GPIO_PM_OPS, }, .probe = xgene_gpio_probe, - .remove = xgene_gpio_remove, }; module_platform_driver(xgene_gpio_driver); |