greybus: svc: always register interfaces at hotplug
authorJohan Hovold <johan@hovoldconsulting.com>
Wed, 9 Mar 2016 11:20:38 +0000 (12:20 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Thu, 10 Mar 2016 21:57:42 +0000 (13:57 -0800)
commit986d6911083150a15b723b33f9aaaf5744b84a84
tree3aa619f2587e949cf628af25c0b08aaa0b8f8236
parenta77660a75a3f79c71064dc6848a2975731ca5c00
greybus: svc: always register interfaces at hotplug

Always register interfaces at hotplug regardless of whether
initialisation succeeded or not.

Even if a module failed to initialise we want it to have a
representation while it is physically present.

Note that the vendor and product-string attribute will read as "(null)"
for now on an interface that failed (early) initialisation.

Also note that the switch route is kept until the interface is finally
removed also on initialisation errors.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Jeffrey Carlyle <jcarlyle@google.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/svc.c