usb: dwc3-msm: Initialize mutex before registering extcon
Improve usb stability Change-Id: I40e1b750a2fac591df2457b0d660db3bc880298a Signed-off-by: kote <kote@oneplus.com> (cherry picked from commit dfd19b024fefed6165bd55858438f26d24cdef8e)
This commit is contained in:
parent
3d05e69b4e
commit
7eb7861c79
1 changed files with 2 additions and 1 deletions
|
@ -3275,6 +3275,8 @@ static int dwc3_msm_probe(struct platform_device *pdev)
|
|||
if (of_property_read_bool(node, "qcom,disable-dev-mode-pm"))
|
||||
pm_runtime_get_noresume(mdwc->dev);
|
||||
|
||||
mutex_init(&mdwc->suspend_resume_mutex);
|
||||
|
||||
ret = dwc3_msm_extcon_register(mdwc);
|
||||
if (ret)
|
||||
goto put_dwc3;
|
||||
|
@ -3295,7 +3297,6 @@ static int dwc3_msm_probe(struct platform_device *pdev)
|
|||
POWER_SUPPLY_PROP_PRESENT, &pval);
|
||||
}
|
||||
|
||||
mutex_init(&mdwc->suspend_resume_mutex);
|
||||
/* Update initial VBUS/ID state from extcon */
|
||||
if (mdwc->extcon_vbus && extcon_get_cable_state_(mdwc->extcon_vbus,
|
||||
EXTCON_USB))
|
||||
|
|
Loading…
Add table
Reference in a new issue