summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-xilinx.c
diff options
context:
space:
mode:
authorRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>2014-12-17 18:51:14 +0300
committerLinus Walleij <linus.walleij@linaro.org>2015-01-15 19:23:18 +0300
commitc458e45045da96b4d3506ba2acab02af8c98c8c2 (patch)
treed2d7485994e52eb56698a688e0337f0aa1614e03 /drivers/gpio/gpio-xilinx.c
parentd621e8bae5ac9c67de4de90c5cded12adc8ee1e1 (diff)
downloadlinux-c458e45045da96b4d3506ba2acab02af8c98c8c2.tar.xz
gpio/xilinx: Use of_mm_gpiochip_remove
Use the newly created of_mm_gpiochip_remove function for cleaning up of_mm_gpiochip_add Suggested-by: Alexandre Courbot <gnurou@gmail.com> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-xilinx.c')
-rw-r--r--drivers/gpio/gpio-xilinx.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpio/gpio-xilinx.c b/drivers/gpio/gpio-xilinx.c
index e89fb4201280..61243d177740 100644
--- a/drivers/gpio/gpio-xilinx.c
+++ b/drivers/gpio/gpio-xilinx.c
@@ -236,10 +236,7 @@ static int xgpio_remove(struct platform_device *pdev)
{
struct xgpio_instance *chip = platform_get_drvdata(pdev);
- gpiochip_remove(&chip->mmchip.gc);
-
- iounmap(chip->mmchip.regs);
- kfree(chip->mmchip.gc.label);
+ of_mm_gpiochip_remove(&chip->mmchip);
return 0;
}