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

Commit 7d8761e7 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "tmc-etr: Add ETR status check in usb_notifier"

parents 4ff12bd3 8cc62eca
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1403,6 +1403,14 @@ void usb_notifier(void *priv, unsigned int event, struct qdss_request *d_req,
	int ret = 0;

	mutex_lock(&drvdata->mem_lock);
	if (drvdata->out_mode != TMC_ETR_OUT_MODE_USB
			|| drvdata->mode == CS_MODE_DISABLED) {
		dev_err(&drvdata->csdev->dev,
		"%s: ETR is not USB mode, or ETR is disabled.\n", __func__);
		mutex_unlock(&drvdata->mem_lock);
		return;
	}

	if (event == USB_QDSS_CONNECT) {
		ret = tmc_etr_fill_usb_bam_data(drvdata);
		if (ret)