greybus: properly cleanup ida and idr structures when shutting down
authorGreg Kroah-Hartman <gregkh@google.com>
Wed, 8 Jul 2015 17:44:09 +0000 (10:44 -0700)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 8 Jul 2015 18:53:43 +0000 (11:53 -0700)
commit5c1ac6945526c76258869c8c04632ab5ae61bdab
treeee38c1643a729fba6d4e314526944b38d31f9f53
parent6ceb8fdeaec665642de944ee47d11440e72a5e26
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>
drivers/staging/greybus/raw.c
drivers/staging/greybus/uart.c
drivers/staging/greybus/vibrator.c