Merge "byte-cntr: Don't write csr register when byte-cntr is disabled"

This commit is contained in:
qctecmdr 2021-09-04 17:09:42 -07:00 committed by Gerrit - the friendly Code Review server
commit 93d96157e9

View file

@ -181,7 +181,8 @@ static int tmc_etr_byte_cntr_release(struct inode *in, struct file *fp)
mutex_lock(&byte_cntr_data->byte_cntr_lock);
byte_cntr_data->read_active = false;
coresight_csr_set_byte_cntr(byte_cntr_data->csr, 0);
if (byte_cntr_data->enable)
coresight_csr_set_byte_cntr(byte_cntr_data->csr, 0);
mutex_unlock(&byte_cntr_data->byte_cntr_lock);
return 0;