summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/bundle.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2015-08-31 17:21:13 +0530
committerJohan Hovold <johan@hovoldconsulting.com>2015-09-03 14:45:09 +0200
commitfda2381bd2d96b4f45806e4796d558eec678e3c6 (patch)
treed2a031d10975846a24f08248fc55404d8ec18209 /drivers/staging/greybus/bundle.c
parent4c583f42c3cc0b6ebb678f5e7ecd5374479bfc22 (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/bundle.c')
-rw-r--r--drivers/staging/greybus/bundle.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/greybus/bundle.c b/drivers/staging/greybus/bundle.c
index 459c62a3efb9..5c09bccf55b8 100644
--- a/drivers/staging/greybus/bundle.c
+++ b/drivers/staging/greybus/bundle.c
@@ -201,10 +201,8 @@ static void gb_bundle_connections_exit(struct gb_bundle *bundle)
struct gb_connection *next;
list_for_each_entry_safe(connection, next, &bundle->connections,
- bundle_links) {
- gb_connection_exit(connection);
+ bundle_links)
gb_connection_destroy(connection);
- }
}
/*