From: Viresh Kumar Date: Sat, 25 Jul 2015 04:40:05 +0000 (+0530) Subject: greybus: es1: create svc connection early enough X-Git-Tag: v4.9-rc1~119^2~378^2~21^2~1294 X-Git-Url: http://git.cascardo.info/?a=commitdiff_plain;h=0b161d0a92717d57fd1598e326a68e859bf92a48;p=cascardo%2Flinux.git greybus: es1: create svc connection early enough The svc connection needs to be ready before creating the URBs, otherwise the svc version request might come in before the AP was ready to parse them. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/es1.c b/drivers/staging/greybus/es1.c index e203180e1e5c..5418f4675ec1 100644 --- a/drivers/staging/greybus/es1.c +++ b/drivers/staging/greybus/es1.c @@ -563,6 +563,12 @@ static int ap_probe(struct usb_interface *interface, return PTR_ERR(hd); } + /* Initialize AP's greybus interface */ + if (!gb_ap_svc_connection_create(hd)) { + retval = -EINVAL; + goto error; + } + es1 = hd_to_es1(hd); es1->hd = hd; es1->usb_intf = interface; @@ -632,12 +638,6 @@ static int ap_probe(struct usb_interface *interface, es1->cport_out_urb_busy[i] = false; /* just to be anal */ } - /* Initialize AP's greybus interface */ - if (!gb_ap_svc_connection_create(hd)) { - retval = -EINVAL; - goto error; - } - apb1_log_enable_dentry = debugfs_create_file("apb1_log_enable", (S_IWUSR | S_IRUGO), gb_debugfs_get(), es1, diff --git a/drivers/staging/greybus/es2.c b/drivers/staging/greybus/es2.c index aba1927fc34f..d2c054a2ec0e 100644 --- a/drivers/staging/greybus/es2.c +++ b/drivers/staging/greybus/es2.c @@ -663,6 +663,12 @@ static int ap_probe(struct usb_interface *interface, return PTR_ERR(hd); } + /* Initialize AP's greybus interface */ + if (!gb_ap_svc_connection_create(hd)) { + retval = -EINVAL; + goto error; + } + es1 = hd_to_es1(hd); es1->hd = hd; es1->usb_intf = interface; @@ -736,12 +742,6 @@ static int ap_probe(struct usb_interface *interface, es1->cport_out_urb_busy[i] = false; /* just to be anal */ } - /* Initialize AP's greybus interface */ - if (!gb_ap_svc_connection_create(hd)) { - retval = -EINVAL; - goto error; - } - apb1_log_enable_dentry = debugfs_create_file("apb1_log_enable", (S_IWUSR | S_IRUGO), gb_debugfs_get(), es1,