gpio: unregister gpiochip device before removing it
authorJohan Hovold <johan@kernel.org>
Mon, 12 Jan 2015 16:12:29 +0000 (17:12 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 May 2015 16:51:32 +0000 (09:51 -0700)
commit864c329b21a1914105a9e591b49def3f30184b65
treed9b6109a6487c311c55689d1a011ffa2f0a0b2d0
parent677c040f35923da4c9fadb2e645854044a5c6a8f
gpio: unregister gpiochip device before removing it

commit 01cca93a9491ed95992523ff7e79dd9bfcdea8e0 upstream.

Unregister gpiochip device (used to export information through sysfs)
before removing it internally. This way removal will reverse addition.

Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpio/gpiolib.c