summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill McVicker <willmcvicker@google.com>2022-04-15 14:06:57 -0700
committerWill McVicker <willmcvicker@google.com>2022-04-15 14:06:57 -0700
commit2b1c0e376a971c1ac60930506efcc9cfa389507d (patch)
treef60af8122e16a9e3b9d42919e469d82dc6ffe5c3
parentd882feb1c5b4140e5196e06be0cc399b9195623c (diff)
downloadcommon-2b1c0e376a971c1ac60930506efcc9cfa389507d.tar.gz
touch/common: remove VH_SYSTRACE dependency
Let's remove the VH_SYSTRACE dependency for goog_touch_interface.ko by just stubbing out the defines. This allows one to build these touch modules by themselves. Signed-off-by: Will McVicker <willmcvicker@google.com> Change-Id: Id714304801c1a0154fb67fdf8738e8c7232a4b55
-rw-r--r--Kconfig1
-rw-r--r--goog_touch_interface.c1
-rw-r--r--goog_touch_interface.h7
3 files changed, 7 insertions, 2 deletions
diff --git a/Kconfig b/Kconfig
index aa62c6d..7636621 100644
--- a/Kconfig
+++ b/Kconfig
@@ -34,7 +34,6 @@ config GOOG_TOUCH_INTERFACE
tristate "Google Touch Interface (GTI)"
depends on TOUCHSCREEN_OFFLOAD
depends on TOUCHSCREEN_HEATMAP
- depends on VH_SYSTRACE
help
Say Y here if you want to enable the Google Touch Interface driver.
diff --git a/goog_touch_interface.c b/goog_touch_interface.c
index 7be8281..f2e4486 100644
--- a/goog_touch_interface.c
+++ b/goog_touch_interface.c
@@ -10,7 +10,6 @@
#include <linux/of.h>
#include "goog_touch_interface.h"
-#include <trace/hooks/systrace.h>
bool goog_v4l2_read_frame_cb(struct v4l2_heatmap *v4l2)
{
diff --git a/goog_touch_interface.h b/goog_touch_interface.h
index ab0113f..70b55ab 100644
--- a/goog_touch_interface.h
+++ b/goog_touch_interface.h
@@ -12,6 +12,13 @@
#include "touch_offload.h"
#include "uapi/input/touch_offload.h"
+#if IS_ENABLED(CONFIG_VH_SYSTRACE)
+#include <trace/hooks/systrace.h>
+#else
+#define ATRACE_BEGIN(f)
+#define ATRACE_END()
+#endif
+
#define GOOG_LOG_NAME "GTI"
#define GOOG_DBG(fmt, args...) pr_debug("[%s] %s: " fmt, GOOG_LOG_NAME,\
__func__, ##args)