diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2016-02-22 07:13:28 -0500 |
---|---|---|
committer | Laxman Dewangan <ldewangan@nvidia.com> | 2016-02-23 10:05:48 -0500 |
commit | 33ba54ee474cda1b55030ba451cf0b804338c742 (patch) | |
tree | c4dea493b4e4d4b84e5cb4db555550f7283ff76b /drivers/gpio/gpio-ts4800.c | |
parent | 0964ac703edf531f678805ae8b158f335869e865 (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.c | 12 |
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 | |||
66 | static 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 | ||
75 | static const struct of_device_id ts4800_gpio_of_match[] = { | 66 | static 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 | ||
89 | module_platform_driver_probe(ts4800_gpio_driver, ts4800_gpio_probe); | 79 | module_platform_driver_probe(ts4800_gpio_driver, ts4800_gpio_probe); |