greybus: connection: call gb_connection_exit() from gb_connection_destroy()
authorViresh Kumar <viresh.kumar@linaro.org>
Mon, 31 Aug 2015 11:51:13 +0000 (17:21 +0530)
committerJohan Hovold <johan@hovoldconsulting.com>
Thu, 3 Sep 2015 12:45:09 +0000 (14:45 +0200)
commitfda2381bd2d96b4f45806e4796d558eec678e3c6
treed2a031d10975846a24f08248fc55404d8ec18209
parent4c583f42c3cc0b6ebb678f5e7ecd5374479bfc22
greybus: connection: call gb_connection_exit() from gb_connection_destroy()

Both the routines are always called together and in the same sequence.
Rather than duplicating this at different places, make
gb_connection_destroy() call gb_connection_exit().

This also makes it more sensible, as gb_connection_init() is never
called directly by the users and so its its counterpart shouldn't be
called directly as well.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
drivers/staging/greybus/bundle.c
drivers/staging/greybus/connection.c
drivers/staging/greybus/connection.h
drivers/staging/greybus/core.c