platform: chrome: Split trace include file
authorGwendal Grignou <gwendal@chromium.org>
Sat, 22 Jan 2022 00:13:01 +0000 (16:13 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:24:07 +0000 (14:24 +0200)
commit81e5b16de862866e7f09a1b00b49f97a9bc23a78
tree27dc4f28c76cab032fad4c9ff10d3127ae48a93d
parent89dad346c241b3654b199a3b9fd19f2413b94576
platform: chrome: Split trace include file

commit eabd9a3807e17e211690e6c40f1405b427b64c48 upstream.

cros_ec_trace.h defined 5 tracing events, 2 for cros_ec_proto and
3 for cros_ec_sensorhub_ring.
These 2 files are in different kernel modules, the traces are defined
twice in the kernel which leads to problem enabling only some traces.

Move sensorhub traces from cros_ec_trace.h to cros_ec_sensorhub_trace.h
and enable them only in cros_ec_sensorhub kernel module.

Check we can now enable any single traces: without this patch,
we can only enable all sensorhub traces or none.

Fixes: d453ceb6549a ("platform/chrome: sensorhub: Add trace events for sample")

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20220122001301.640337-1-gwendal@chromium.org
Signed-off-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/platform/chrome/Makefile
drivers/platform/chrome/cros_ec_sensorhub_ring.c
drivers/platform/chrome/cros_ec_sensorhub_trace.h [new file with mode: 0644]
drivers/platform/chrome/cros_ec_trace.h