aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-ts4800.c
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2016-02-22 07:13:28 -0500
committerLaxman Dewangan <ldewangan@nvidia.com>2016-02-23 10:05:48 -0500
commit33ba54ee474cda1b55030ba451cf0b804338c742 (patch)
treec4dea493b4e4d4b84e5cb4db555550f7283ff76b /drivers/gpio/gpio-ts4800.c
parent0964ac703edf531f678805ae8b158f335869e865 (diff)
gpio: ts4800: 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-ts4800.c')
-rw-r--r--drivers/gpio/gpio-ts4800.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/gpio/gpio-ts4800.c b/drivers/gpio/gpio-ts4800.c
index 9da79e4a67c5..029b646bf19e 100644
--- a/drivers/gpio/gpio-ts4800.c
+++ b/drivers/gpio/gpio-ts4800.c
@@ -60,16 +60,7 @@ static int ts4800_gpio_probe(struct platform_device *pdev)
60 60
61 platform_set_drvdata(pdev, chip); 61 platform_set_drvdata(pdev, chip);
62 62
63 return gpiochip_add_data(chip, NULL); 63 return devm_gpiochip_add_data(&pdev->dev, chip, NULL);
64}
65
66static int ts4800_gpio_remove(struct platform_device *pdev)
67{
68 struct gpio_chip *chip = platform_get_drvdata(pdev);
69
70 gpiochip_remove(chip);
71
72 return 0;
73} 64}
74 65
75static const struct of_device_id ts4800_gpio_of_match[] = { 66static const struct of_device_id ts4800_gpio_of_match[] = {
@@ -83,7 +74,6 @@ static struct platform_driver ts4800_gpio_driver = {
83 .of_match_table = ts4800_gpio_of_match, 74 .of_match_table = ts4800_gpio_of_match,
84 }, 75 },
85 .probe = ts4800_gpio_probe, 76 .probe = ts4800_gpio_probe,
86 .remove = ts4800_gpio_remove,
87}; 77};
88 78
89module_platform_driver_probe(ts4800_gpio_driver, ts4800_gpio_probe); 79module_platform_driver_probe(ts4800_gpio_driver, ts4800_gpio_probe);