From c458e45045da96b4d3506ba2acab02af8c98c8c2 Mon Sep 17 00:00:00 2001 From: Ricardo Ribalda Delgado Date: Wed, 17 Dec 2014 16:51:14 +0100 Subject: 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 Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Linus Walleij --- drivers/gpio/gpio-xilinx.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'drivers/gpio/gpio-xilinx.c') 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; } -- cgit v1.2.3