gpio: unregister gpiochip device before removing it
authorJohan Hovold <johan@kernel.org>
Mon, 12 Jan 2015 16:12:29 +0000 (17:12 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 6 Aug 2015 23:32:08 +0000 (00:32 +0100)
commitc833e96de15cb46c8587271a32c651c0acc40dd3
tree2f747a36924345065112a87c14ef02894e766835
parent56481c2920bb35e8a0b8abd55eeb5e52e8bce042
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>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/gpio/gpiolib.c