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

Commit 105f21fe authored by Azhar Shaikh's avatar Azhar Shaikh
Browse files

usb: dwc3-msm: Enable pmic_id_irq after driver_data is populated



There was an issue where the pmic_id_irq was triggered very early
during device boot-up, even before the driver_data was populated.
Since the pmic_id_irq is not enabled at this point, it causes a NULL
pointer exception.
So to fix this, enable pmic_id_irq after driver_data is being populated.

CRs-fixed: 741573
Change-Id: I0da140f0d344f5035f12b7aaf210ae7e116aa29d
Signed-off-by: default avatarAzhar Shaikh <azhars@codeaurora.org>
parent a65cf5a3
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2976,6 +2976,8 @@ static int dwc3_msm_probe(struct platform_device *pdev)
			} else if (ret == 0) {
				mdwc->pmic_id_irq = 0;
			} else {
				irq_set_status_flags(mdwc->pmic_id_irq,
						IRQ_NOAUTOEN);
				ret = devm_request_irq(&pdev->dev,
						       mdwc->pmic_id_irq,
						       dwc3_pmic_id_irq,
@@ -3250,6 +3252,7 @@ static int dwc3_msm_probe(struct platform_device *pdev)

	/* Update initial ID state */
	if (mdwc->pmic_id_irq) {
		enable_irq(mdwc->pmic_id_irq);
		local_irq_save(flags);
		mdwc->id_state = !!irq_read_line(mdwc->pmic_id_irq);
		if (mdwc->id_state == DWC3_ID_GROUND)