diff options
author | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2018-06-21 14:12:52 -0300 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2018-06-29 15:04:18 +0100 |
commit | 349632a29ddb7d2ac7a7dc26499640ab2123fc7b (patch) | |
tree | 76da80fd3296e73c1ba68289075a555811fbf7e3 /hw/input/tsc2005.c | |
parent | cb2d721cb3a2a83084141952f09a7363e2f52705 (diff) |
hw/input/tsc2005: Convert a fprintf() call to trace events
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw/input/tsc2005.c')
-rw-r--r-- | hw/input/tsc2005.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/hw/input/tsc2005.c b/hw/input/tsc2005.c index 4dd95596ab..2b9108a193 100644 --- a/hw/input/tsc2005.c +++ b/hw/input/tsc2005.c @@ -24,6 +24,7 @@ #include "qemu/timer.h" #include "ui/console.h" #include "hw/devices.h" +#include "trace.h" #define TSC_CUT_RESOLUTION(value, p) ((value) >> (16 - (p ? 12 : 10))) @@ -201,8 +202,7 @@ static void tsc2005_write(TSC2005State *s, int reg, uint16_t data) s->host_mode = (data >> 15) != 0; if (s->enabled != !(data & 0x4000)) { s->enabled = !(data & 0x4000); - fprintf(stderr, "%s: touchscreen sense %sabled\n", - __func__, s->enabled ? "en" : "dis"); + trace_tsc2005_sense(s->enabled ? "enabled" : "disabled"); if (s->busy && !s->enabled) timer_del(s->timer); s->busy = s->busy && s->enabled; @@ -340,8 +340,7 @@ static uint8_t tsc2005_txrx_word(void *opaque, uint8_t value) s->nextprecision = (value >> 2) & 1; if (s->enabled != !(value & 1)) { s->enabled = !(value & 1); - fprintf(stderr, "%s: touchscreen sense %sabled\n", - __func__, s->enabled ? "en" : "dis"); + trace_tsc2005_sense(s->enabled ? "enabled" : "disabled"); if (s->busy && !s->enabled) timer_del(s->timer); s->busy = s->busy && s->enabled; |