gpio/xilinx: Use of_mm_gpiochip_remove
authorRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Wed, 17 Dec 2014 15:51:14 +0000 (16:51 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 15 Jan 2015 16:23:18 +0000 (17:23 +0100)
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>
drivers/gpio/gpio-xilinx.c

index e89fb42..61243d1 100644 (file)
@@ -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;
 }