greybus: connection: Call connection_destroy() from gb_connection_svc_connection_dest...
authorViresh Kumar <viresh.kumar@linaro.org>
Mon, 7 Sep 2015 10:31:23 +0000 (16:01 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Tue, 15 Sep 2015 04:19:46 +0000 (21:19 -0700)
commitfb198317fd89ec02582ffd4ca318ec088d06c74e
treeae11b337e8aaf8c4a56613b4f3cf5e1f99e2456e
parent1b7a9cd5a54536af5a97738097780369779c62d9
greybus: connection: Call connection_destroy() from gb_connection_svc_connection_destroy()

connection_create() is called right after svc is requested to create the
connection and so connection_destroy() must be called just before we
request the SVC to destroy the connection.

Over that, this fixes the inconsistency where connection_create() is
called for all connections except SVC connection, but
connection_destroy() is called always.

Acked-by: Alexandre Bailon <abailon@baylibre.com>
Fixes: 5313ca607afb ("Greybus driver: add a new callbacks to driver")
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/connection.c