greybus: lights: Break light setup into two parts

This breaks the light setup routine into two parts, the first one
allocates all the necessary resources and the second on registers lights
to the required frameworks.

This is required to enable only TX on the connection, until we have
allocated all the resources, otherwise the request handler might get
called for partially initialized structures.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Rui Miguel Silva <rui.silva@linaro.org>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
1 file changed
tree: 2e06cf1ccd0f053ebb2630e4eee0625f7f0d1afb
  1. drivers/