diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-06-20 11:25:44 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-06-20 11:25:44 -0400 |
commit | af52739b922f656eb1f39016fabaabe4baeda2e2 (patch) | |
tree | 79a7aa810d0493cd0cf4adebac26d37f12e8b545 /drivers/hwtracing/coresight/coresight-tmc-etr.c | |
parent | 25ed6a5e97809129a1bc852b6b5c7d03baa112c4 (diff) | |
parent | 33688abb2802ff3a230bd2441f765477b94cc89e (diff) |
Merge 4.7-rc4 into staging-next
We want the fixes in here, and we can resolve a merge issue in
drivers/iio/industrialio-trigger.c
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hwtracing/coresight/coresight-tmc-etr.c')
-rw-r--r-- | drivers/hwtracing/coresight/coresight-tmc-etr.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/hwtracing/coresight/coresight-tmc-etr.c b/drivers/hwtracing/coresight/coresight-tmc-etr.c index 847d1b5f2c13..688be9e060fc 100644 --- a/drivers/hwtracing/coresight/coresight-tmc-etr.c +++ b/drivers/hwtracing/coresight/coresight-tmc-etr.c | |||
@@ -300,13 +300,10 @@ int tmc_read_unprepare_etr(struct tmc_drvdata *drvdata) | |||
300 | if (local_read(&drvdata->mode) == CS_MODE_SYSFS) { | 300 | if (local_read(&drvdata->mode) == CS_MODE_SYSFS) { |
301 | /* | 301 | /* |
302 | * The trace run will continue with the same allocated trace | 302 | * The trace run will continue with the same allocated trace |
303 | * buffer. As such zero-out the buffer so that we don't end | 303 | * buffer. The trace buffer is cleared in tmc_etr_enable_hw(), |
304 | * up with stale data. | 304 | * so we don't have to explicitly clear it. Also, since the |
305 | * | 305 | * tracer is still enabled drvdata::buf can't be NULL. |
306 | * Since the tracer is still enabled drvdata::buf | ||
307 | * can't be NULL. | ||
308 | */ | 306 | */ |
309 | memset(drvdata->buf, 0, drvdata->size); | ||
310 | tmc_etr_enable_hw(drvdata); | 307 | tmc_etr_enable_hw(drvdata); |
311 | } else { | 308 | } else { |
312 | /* | 309 | /* |
@@ -315,7 +312,7 @@ int tmc_read_unprepare_etr(struct tmc_drvdata *drvdata) | |||
315 | */ | 312 | */ |
316 | vaddr = drvdata->vaddr; | 313 | vaddr = drvdata->vaddr; |
317 | paddr = drvdata->paddr; | 314 | paddr = drvdata->paddr; |
318 | drvdata->buf = NULL; | 315 | drvdata->buf = drvdata->vaddr = NULL; |
319 | } | 316 | } |
320 | 317 | ||
321 | drvdata->reading = false; | 318 | drvdata->reading = false; |