greybus: interface: reduce control-device lifetime
authorJohan Hovold <johan@hovoldconsulting.com>
Wed, 13 Apr 2016 17:19:06 +0000 (19:19 +0200)
committerGreg Kroah-Hartman <gregkh@google.com>
Thu, 21 Apr 2016 01:09:03 +0000 (10:09 +0900)
commit49605839bcd644016e2ec3b1534104e2cb3ce984
treeab7f3b6f6f0a5bb89053d3a7744eafecc645ba27
parentb6147e4fb13e926878dbef9adae429faf8d8c2dd
greybus: interface: reduce control-device lifetime

Make the control-device lifetime coincide with when the interface is
enabled (enumerated).

This is needed to be able register a new control device after a mode
switch.

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