diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2015-08-31 17:21:13 +0530 |
---|---|---|
committer | Johan Hovold <johan@hovoldconsulting.com> | 2015-09-03 14:45:09 +0200 |
commit | fda2381bd2d96b4f45806e4796d558eec678e3c6 (patch) | |
tree | d2a031d10975846a24f08248fc55404d8ec18209 /drivers/staging/greybus/core.c | |
parent | 4c583f42c3cc0b6ebb678f5e7ecd5374479bfc22 (diff) |
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>
Diffstat (limited to 'drivers/staging/greybus/core.c')
-rw-r--r-- | drivers/staging/greybus/core.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/greybus/core.c b/drivers/staging/greybus/core.c index 605a0887dc61..3c89cb368f6d 100644 --- a/drivers/staging/greybus/core.c +++ b/drivers/staging/greybus/core.c @@ -259,10 +259,8 @@ void greybus_remove_hd(struct greybus_host_device *hd) gb_endo_remove(hd->endo); /* Is the SVC still using the partially uninitialized connection ? */ - if (hd->initial_svc_connection) { - gb_connection_exit(hd->initial_svc_connection); + if (hd->initial_svc_connection) gb_connection_destroy(hd->initial_svc_connection); - } /* * Make sure there are no leftovers that can potentially corrupt sysfs. |