greybus: set up connection->private properly

The connection->private pointer should refer to a protocol-specific
data structure.  Change two protocol drivers (USB and vibrator) so
they now set this.

In addition, because the setup routine may need access to the
data structure, the private pointer should be set early--as
early as possible.  Make the UART, i2c, and GPIO protocol drivers
set the private pointer earlier.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
diff --git a/drivers/staging/greybus/pwm-gb.c b/drivers/staging/greybus/pwm-gb.c
index 9678b64..c505f1d 100644
--- a/drivers/staging/greybus/pwm-gb.c
+++ b/drivers/staging/greybus/pwm-gb.c
@@ -266,6 +266,7 @@
 	if (!pwmc)
 		return -ENOMEM;
 	pwmc->connection = connection;
+	connection->private = pwmc;
 
 	/* Check for compatible protocol version */
 	ret = gb_pwm_proto_version_operation(pwmc);
@@ -290,7 +291,6 @@
 		pr_err("Failed to register PWM\n");
 		return ret;
 	}
-	connection->private = pwmc;
 
 	return 0;
 out_err: