diff options
author | Bartosz Golaszewski <bgolaszewski@baylibre.com> | 2019-05-28 17:46:01 +0200 |
---|---|---|
committer | Bartosz Golaszewski <bgolaszewski@baylibre.com> | 2019-05-31 09:32:39 +0200 |
commit | 8764c4ca5049d3ae7984a528a428a3f6881a2216 (patch) | |
tree | f40f46944908ed2028f8ee4aa3fa1878ad0fdb81 /drivers/gpio | |
parent | 715ed72801ff4d0dd9938e36513a01a57e13740a (diff) | |
download | linux-8764c4ca5049d3ae7984a528a428a3f6881a2216.tar.gz linux-8764c4ca5049d3ae7984a528a428a3f6881a2216.tar.bz2 linux-8764c4ca5049d3ae7984a528a428a3f6881a2216.zip |
gpio: em: use the managed version of gpiochip_add_data()
Use the managed variant of gpiochip_add_data() and remove the call to
gpiochip_remove().
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpio-em.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpio/gpio-em.c b/drivers/gpio/gpio-em.c index 40f8c38bec1c..299101d25fa8 100644 --- a/drivers/gpio/gpio-em.c +++ b/drivers/gpio/gpio-em.c @@ -359,7 +359,7 @@ static int em_gio_probe(struct platform_device *pdev) goto err1; } - ret = gpiochip_add_data(gpio_chip, p); + ret = devm_gpiochip_add_data(&pdev->dev, gpio_chip, p); if (ret) { dev_err(&pdev->dev, "failed to add GPIO controller\n"); goto err1; @@ -376,8 +376,6 @@ static int em_gio_remove(struct platform_device *pdev) { struct em_gio_priv *p = platform_get_drvdata(pdev); - gpiochip_remove(&p->gpio_chip); - irq_domain_remove(p->irq_domain); return 0; } |