Skip to content

Commit

Permalink
gpio/xilinx: Use of_mm_gpiochip_remove
Browse files Browse the repository at this point in the history
Use the newly created of_mm_gpiochip_remove function for cleaning up
of_mm_gpiochip_add

Suggested-by: Alexandre Courbot <[email protected]>
Signed-off-by: Ricardo Ribalda Delgado <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
  • Loading branch information
ribalda authored and linusw committed Jan 15, 2015
1 parent d621e8b commit c458e45
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/gpio/gpio-xilinx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit c458e45

Please sign in to comment.