MLK-14396 usb: chipidea: add mutex for concurrent running
authorPeter Chen <peter.chen@nxp.com>
Tue, 14 Mar 2017 05:57:39 +0000 (13:57 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:21:30 +0000 (15:21 -0500)
commit9141d652ba6f130842e281d19502aa2313152858
treea0727d51567f65dad1218750d6ee75f7317b4061
parent669adc2f6196c3540ba8a2fd4512761526ba9097
MLK-14396 usb: chipidea: add mutex for concurrent running

The ci_handle_id_switch is called at two places, at very rare situations,
it may be running at the same time. Eg, when the system is back from
the resume, the id event is occurred from extcon driver, as well as
power_lost work item is called due to the controller is poweroff at
the suspend.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
drivers/usb/chipidea/ci.h
drivers/usb/chipidea/core.c
drivers/usb/chipidea/otg.c