mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
Merge "tmc-etr: Add ETR status check in usb_notifier"
This commit is contained in:
commit
744e6ae9a6
1 changed files with 9 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue