greybus: connection: call gb_svc_connection_create() from gb_connection_init()
authorViresh Kumar <viresh.kumar@linaro.org>
Mon, 7 Sep 2015 10:31:21 +0000 (16:01 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Tue, 15 Sep 2015 04:19:46 +0000 (21:19 -0700)
commita1163fae63079f01c24d9c062b1e22e5ada89f91
tree1a9ca617dfdd8f11471b0ccdaf281dcdeb4a9049
parent4317f874f48d14fbd5b1d408336843dbe129ab3e
greybus: connection: call gb_svc_connection_create() from gb_connection_init()

There are two operations which very much work together:
- AP asks the SVC to create a connection between a cport of AP and a
  cport of module.
- AP tells the module that the connection is created.

Its better (logically) to do these two operations together and so call
gb_svc_connection_create() from gb_connection_init() instead. Also check
its return value properly.

Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/connection.c