From: David Lin Date: Fri, 8 Jul 2016 03:07:00 +0000 (-0500) Subject: greybus: interface: send deactivate prepare when interface is disabled X-Git-Tag: v4.9.8~1233^2~378^2~21^2~187 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=576bffb5a84f205c9ada777bc201b95cd8c0b868;p=platform%2Fkernel%2Flinux-rpi3.git greybus: interface: send deactivate prepare when interface is disabled The AP Interface shall exchange a Greybus Control Interface Deactivate Prepare Operation with the Interface being powered down. Testing Done: - Check for the return code after sending the deactivate prepare operation Signed-off-by: David Lin Reviewed-by: Johan Hovold Signed-off-by: Alex Elder --- diff --git a/drivers/staging/greybus/interface.c b/drivers/staging/greybus/interface.c index 2290a9c3f..e7efc54 100644 --- a/drivers/staging/greybus/interface.c +++ b/drivers/staging/greybus/interface.c @@ -861,6 +861,9 @@ void gb_interface_disable(struct gb_interface *intf) list_for_each_entry_safe(bundle, next, &intf->bundles, links) gb_bundle_destroy(bundle); + if (!intf->mode_switch && !intf->disconnected) + gb_control_interface_deactivate_prepare(intf->control); + gb_timesync_interface_remove(intf); gb_control_del(intf->control); gb_control_disable(intf->control);