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:40 -0500 |
| commit | bc72f7f7b8ae9847d2a7bad610cdd300de72ab21 (patch) | |
| tree | 0e7c220cd5e77267dcd4d1d33e1b5ff1976297ca /drivers/gpio | |
| parent | 297bf067eca3cefc944493a517f593bf67dd1e52 (diff) | |
gpio: rc5t583: 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-rc5t583.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/gpio/gpio-rc5t583.c b/drivers/gpio/gpio-rc5t583.c index 1e2d210b3369..1d6100fa312a 100644 --- a/drivers/gpio/gpio-rc5t583.c +++ b/drivers/gpio/gpio-rc5t583.c | |||
| @@ -136,15 +136,8 @@ static int rc5t583_gpio_probe(struct platform_device *pdev) | |||
| 136 | 136 | ||
| 137 | platform_set_drvdata(pdev, rc5t583_gpio); | 137 | platform_set_drvdata(pdev, rc5t583_gpio); |
| 138 | 138 | ||
| 139 | return gpiochip_add_data(&rc5t583_gpio->gpio_chip, rc5t583_gpio); | 139 | return devm_gpiochip_add_data(&pdev->dev, &rc5t583_gpio->gpio_chip, |
| 140 | } | 140 | rc5t583_gpio); |
| 141 | |||
| 142 | static int rc5t583_gpio_remove(struct platform_device *pdev) | ||
| 143 | { | ||
| 144 | struct rc5t583_gpio *rc5t583_gpio = platform_get_drvdata(pdev); | ||
| 145 | |||
| 146 | gpiochip_remove(&rc5t583_gpio->gpio_chip); | ||
| 147 | return 0; | ||
| 148 | } | 141 | } |
| 149 | 142 | ||
| 150 | static struct platform_driver rc5t583_gpio_driver = { | 143 | static struct platform_driver rc5t583_gpio_driver = { |
| @@ -152,7 +145,6 @@ static struct platform_driver rc5t583_gpio_driver = { | |||
| 152 | .name = "rc5t583-gpio", | 145 | .name = "rc5t583-gpio", |
| 153 | }, | 146 | }, |
| 154 | .probe = rc5t583_gpio_probe, | 147 | .probe = rc5t583_gpio_probe, |
| 155 | .remove = rc5t583_gpio_remove, | ||
| 156 | }; | 148 | }; |
| 157 | 149 | ||
| 158 | static int __init rc5t583_gpio_init(void) | 150 | static int __init rc5t583_gpio_init(void) |
