diff options
author | Johan Hovold <johan@hovoldconsulting.com> | 2015-12-07 15:05:34 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2015-12-08 15:31:14 -0500 |
commit | 0bf1f2441979e290945f4e5af40d76582c61da1e (patch) | |
tree | 9656af68832e9aa9594eac0acbbff2c64d5ae66a /drivers/staging/greybus/interface.c | |
parent | 36173112354a4f5993d464f95b04d41e1eec10a0 (diff) |
greybus: connection: separate connection creation and enabling
Separate connection creation from enabling.
This will ultimately allow connection structures to be created while
parsing manifests, but the connections to not be enabled until a driver
is bound.
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/interface.c')
-rw-r--r-- | drivers/staging/greybus/interface.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/staging/greybus/interface.c b/drivers/staging/greybus/interface.c index 9ff7464b8459..e8eed858b545 100644 --- a/drivers/staging/greybus/interface.c +++ b/drivers/staging/greybus/interface.c @@ -180,6 +180,12 @@ int gb_interface_init(struct gb_interface *intf, u8 device_id) return -ENOMEM; } + ret = gb_connection_init(connection); + if (ret) { + gb_connection_destroy(connection); + return ret; + } + /* Get manifest size using control protocol on CPort */ size = gb_control_get_manifest_size_operation(intf); if (size <= 0) { |