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/hd.c | |
parent | 36173112354a4f5993d464f95b04d41e1eec10a0 (diff) | |
download | op-kernel-dev-0bf1f2441979e290945f4e5af40d76582c61da1e.zip op-kernel-dev-0bf1f2441979e290945f4e5af40d76582c61da1e.tar.gz |
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/hd.c')
-rw-r--r-- | drivers/staging/greybus/hd.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/staging/greybus/hd.c b/drivers/staging/greybus/hd.c index b280925..74569a3 100644 --- a/drivers/staging/greybus/hd.c +++ b/drivers/staging/greybus/hd.c @@ -124,6 +124,13 @@ int gb_hd_add(struct gb_host_device *hd) return ret; } + ret = gb_connection_init(hd->svc_connection); + if (ret) { + gb_connection_destroy(hd->svc_connection); + device_del(&hd->dev); + return ret; + } + return 0; } EXPORT_SYMBOL_GPL(gb_hd_add); |