greybus: svc: connection is created only once now
authorViresh Kumar <viresh.kumar@linaro.org>
Fri, 24 Jul 2015 10:02:20 +0000 (15:32 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Fri, 24 Jul 2015 23:33:20 +0000 (16:33 -0700)
commitdcd05008e491252280c178d9d5300a885b4f4548
tree96850ac5b60d493c92a0080d71281a55a91b38d5
parent67c93ae6f544a0953d1159ffcc0dd14bea77fc53
greybus: svc: connection is created only once now

We no longer create a fresh connection on receiving svc-hello message,
but rather update the initial one.

Update 'initial_svc_connection' after the connection is fully
initialized. Look for the partially initialized connection while
removing hd, as hd might be removed before getting svc-hello requests
from svc.

Also update gb_svc_connection_init() to initialize id_map on the first
(and the only) call to connection-init function.

We also can't update connection->bundle->intf->svc, as its a bundle-less
connection. Lets stop updating intf->svc as its not really used.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Tested-by: Perry Hung <perry@leaflabs.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/core.c
drivers/staging/greybus/svc.c