summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/uart.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman2015-07-08 19:44:09 +0200
committerGreg Kroah-Hartman2015-07-08 20:53:43 +0200
commit5c1ac6945526c76258869c8c04632ab5ae61bdab (patch)
treeee38c1643a729fba6d4e314526944b38d31f9f53 /drivers/staging/greybus/uart.c
parentgreybus: svc: save pointer to struct gb_svc in struct gb_interface (diff)
downloadkernel-qcow2-linux-5c1ac6945526c76258869c8c04632ab5ae61bdab.tar.gz
kernel-qcow2-linux-5c1ac6945526c76258869c8c04632ab5ae61bdab.tar.xz
kernel-qcow2-linux-5c1ac6945526c76258869c8c04632ab5ae61bdab.zip
greybus: properly cleanup ida and idr structures when shutting down
idr and ida structures have internal memory allocated that needs to be freed when modules are removed. So call the proper idr_destroy() or ida_destroy() functions on the module exit path to free the memory. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Reviewed-by: Alex Elder <elder@linaro.org>
Diffstat (limited to 'drivers/staging/greybus/uart.c')
-rw-r--r--drivers/staging/greybus/uart.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/greybus/uart.c
index e2a456f8105c..3932f8667d31 100644
--- a/drivers/staging/greybus/uart.c
+++ b/drivers/staging/greybus/uart.c
@@ -761,6 +761,7 @@ static void gb_tty_exit(void)
{
tty_unregister_driver(gb_tty_driver);
put_tty_driver(gb_tty_driver);
+ idr_destroy(&tty_minors);
}
static struct gb_protocol uart_protocol = {