coresight-tmc-etr: use sysfs_buf in tmc_sg_get_rwp_offset()

When usb bypass start, etr_buf may be null. If etr disable hw is
called at the same time. Use sysfs_buf in tmc_sg_get_rwp_offset to
avoid this issue.

Change-Id: Id1e45269d08f61413d385de7aa46df4cc3d8c44d
Signed-off-by: Yuanfang Zhang <zhangyuanfang@codeaurora.org>
This commit is contained in:
Yuanfang Zhang 2021-06-30 18:11:14 +08:00 • committed by Gerrit - the friendly Code Review server
commit 12d07c9ed6

View file

@ -275,7 +275,7 @@ void tmc_free_sg_table(struct tmc_sg_table *sg_table)
long tmc_sg_get_rwp_offset(struct tmc_drvdata *drvdata)
{
struct etr_buf *etr_buf = drvdata->etr_buf;
struct etr_buf *etr_buf = drvdata->sysfs_buf;
struct etr_sg_table *etr_table = etr_buf->private;
struct tmc_sg_table *table = etr_table->sg_table;
u64 rwp;