From 0bf1f2441979e290945f4e5af40d76582c61da1e Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Mon, 7 Dec 2015 15:05:34 +0100 Subject: 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 Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/hd.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers/staging/greybus/hd.c') 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); -- cgit v1.1