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

Commit 744e6ae9 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 9a5ca1ee 6ce22978
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -1324,6 +1324,15 @@ 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)