summaryrefslogtreecommitdiff
path: root/drivers/bcma/driver_gpio.c
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2013-02-03 23:25:33 +0100
committerJohn W. Linville <linville@tuxdriver.com>2013-02-04 16:46:24 -0500
commitc50ae9470e542862f782e2d9c106270152bbf3ce (patch)
treed9b17d4f6427e7b2bb35a0ecdf08f1891dbcc9e5 /drivers/bcma/driver_gpio.c
parenta5ffbe0a1993a27072742ef7db6cf9839956fce9 (diff)
bcma: unregister gpios before unloading bcma
This patch unregisters the gpio chip before bcma gets unloaded. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Reported-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/bcma/driver_gpio.c')
-rw-r--r--drivers/bcma/driver_gpio.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/bcma/driver_gpio.c b/drivers/bcma/driver_gpio.c
index 9a6f585da2d9..71f755c06fc6 100644
--- a/drivers/bcma/driver_gpio.c
+++ b/drivers/bcma/driver_gpio.c
@@ -96,3 +96,8 @@ int bcma_gpio_init(struct bcma_drv_cc *cc)
return gpiochip_add(chip);
}
+
+int bcma_gpio_unregister(struct bcma_drv_cc *cc)
+{
+ return gpiochip_remove(&cc->gpio);
+}