Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 9001ce41 authored by Albert Wang's avatar Albert Wang Committed by Michael Bestas
Browse files

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: default avatarJimmy Hu <hhhuuu@google.com>
Change-Id: I63f58c3df620e91367b23b405fa0e9a577313964
Signed-off-by: default avatarAlbert Wang <albertccwang@google.com>
parent 18e266da
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -4033,6 +4033,9 @@ static int dwc3_msm_probe(struct platform_device *pdev)

	mutex_init(&mdwc->suspend_resume_mutex);

	/* set the initial value */
	mdwc->usb_data_enabled = true;

	if (of_property_read_bool(node, "extcon")) {
		ret = dwc3_msm_extcon_register(mdwc);
		if (ret)
@@ -4093,8 +4096,6 @@ static int dwc3_msm_probe(struct platform_device *pdev)
		dwc3_ext_event_notify(mdwc);
	}

	/* set the initial value */
	mdwc->usb_data_enabled = true;
	device_create_file(&pdev->dev, &dev_attr_orientation);
	device_create_file(&pdev->dev, &dev_attr_mode);
	device_create_file(&pdev->dev, &dev_attr_speed);