aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpio/gpio-xgene.c11
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)
193 193
194 platform_set_drvdata(pdev, gpio); 194 platform_set_drvdata(pdev, gpio);
195 195
196 err = gpiochip_add_data(&gpio->chip, gpio); 196 err = devm_gpiochip_add_data(&pdev->dev, &gpio->chip, gpio);
197 if (err) { 197 if (err) {
198 dev_err(&pdev->dev, 198 dev_err(&pdev->dev,
199 "failed to register gpiochip.\n"); 199 "failed to register gpiochip.\n");
@@ -207,14 +207,6 @@ err:
207 return err; 207 return err;
208} 208}
209 209
210static int xgene_gpio_remove(struct platform_device *pdev)
211{
212 struct xgene_gpio *gpio = platform_get_drvdata(pdev);
213
214 gpiochip_remove(&gpio->chip);
215 return 0;
216}
217
218static const struct of_device_id xgene_gpio_of_match[] = { 210static const struct of_device_id xgene_gpio_of_match[] = {
219 { .compatible = "apm,xgene-gpio", }, 211 { .compatible = "apm,xgene-gpio", },
220 {}, 212 {},
@@ -228,7 +220,6 @@ static struct platform_driver xgene_gpio_driver = {
228 .pm = XGENE_GPIO_PM_OPS, 220 .pm = XGENE_GPIO_PM_OPS,
229 }, 221 },
230 .probe = xgene_gpio_probe, 222 .probe = xgene_gpio_probe,
231 .remove = xgene_gpio_remove,
232}; 223};
233 224
234module_platform_driver(xgene_gpio_driver); 225module_platform_driver(xgene_gpio_driver);