This driver calls of_mm_gpiochip_add() to add a memory mapped gpio
chip. So, of_mm_gpiochip_remove() should be used when removing it.
The direct call of gpiochip_remove() misses unmapping the register
and freeing the label.
Signed-off-by: Masahiro Yamada <[email protected]>
Reviewed-by: Alexandre Courbot <[email protected]>
Acked-by: Tien Hock Loh <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
{
struct altera_gpio_chip *altera_gc = platform_get_drvdata(pdev);
- gpiochip_remove(&altera_gc->mmchip.gc);
+ of_mm_gpiochip_remove(&altera_gc->mmchip);
return 0;
}