usb: dwc3: Set the initial value of usb_data_enabled before use
Fixes: 4b7e37cbcd65 ("usb: new attributes implementation to enable/disable usb data")
Bug: 194649527
Test: build, boot
Signed-off-by: Jimmy Hu <hhhuuu@google.com>
Change-Id: I63f58c3df620e91367b23b405fa0e9a577313964
Signed-off-by: Albert Wang <albertccwang@google.com>
This commit is contained in:
parent
8058e93fde
commit
eeb1fca2aa
1 changed files with 3 additions and 2 deletions
|
|
@ -3986,6 +3986,9 @@ static int dwc3_msm_probe(struct platform_device *pdev)
|
|||
if (of_property_read_bool(node, "qcom,connector-type-uAB"))
|
||||
mdwc->type_c = false;
|
||||
|
||||
/* set the initial value */
|
||||
mdwc->usb_data_enabled = true;
|
||||
|
||||
mdwc->usb_psy = power_supply_get_by_name("usb");
|
||||
if (!mdwc->usb_psy) {
|
||||
dev_warn(mdwc->dev, "Could not get usb power_supply\n");
|
||||
|
|
@ -4023,8 +4026,6 @@ static int dwc3_msm_probe(struct platform_device *pdev)
|
|||
dev_info(mdwc->dev, "charger detection in progress\n");
|
||||
}
|
||||
|
||||
/* set the initial value */
|
||||
mdwc->usb_data_enabled = true;
|
||||
device_create_file(&pdev->dev, &dev_attr_mode);
|
||||
device_create_file(&pdev->dev, &dev_attr_speed);
|
||||
device_create_file(&pdev->dev, &dev_attr_usb_compliance_mode);
|
||||
|
|
|
|||
Loading…
Reference in a new issue