greybus: svc: Set interface's hotplug attributes before using them
authorViresh Kumar <viresh.kumar@linaro.org>
Wed, 23 Dec 2015 03:37:42 +0000 (09:07 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 23 Dec 2015 21:00:28 +0000 (13:00 -0800)
commit63d742b68abd09977dfa9f488e5494ec65485ef0
treef5d607c24f54950abe209b31c9f9a16aba6176e6
parent72e53aed1d077166b63537b2b08dc89af60d6c9a
greybus: svc: Set interface's hotplug attributes before using them

gb_svc_read_and_clear_module_boot_status() relies on the values of
ddbl1_manufacturer_id and ddbl1_product_id to distinguish between ES2
and ES3 chips, but those values are set for the interface structure only
after gb_svc_read_and_clear_module_boot_status() is called.

This makes ES2 module to fail with following errors:

greybus 1-2: Module not ready yet
greybus 1-svc: failed to clear boot status of interface 2: -19

Fix this by setting these values before calling
gb_svc_read_and_clear_module_boot_status().

Fixes: 51f1dc421b1f ("firmware and svc: detect the difference between ES2 and ES3 chips")
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/svc.c