From f316870a53377b1e4d5368f2501e775ffab3e470 Mon Sep 17 00:00:00 2001 From: xizx Date: Mon, 27 Jul 2020 12:05:14 +0800 Subject: [PATCH] sensor_class: use ANDROID_BUILD_TOP in Kbuild fix the compile error during GKI kernel 5.4: /home/xizx/work/moto/8350/8350_mainline_0724-new/kernel/msm-5.4/../../motorola/kernel/modules/drivers/sensors/sensors_class.c:22:10: fatal error: 'linux/sensors.h' file not found Change-Id: I11386a05de3f46e27382334dacbadaedec3f5500 Reviewed-on: https://gerrit.mot.com/1706404 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Zhenxin Xi Submit-Approved: Jira Key --- drivers/sensors/Kbuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/sensors/Kbuild b/drivers/sensors/Kbuild index 5d9904cae07c..b50ef6c2c4d8 100644 --- a/drivers/sensors/Kbuild +++ b/drivers/sensors/Kbuild @@ -1,5 +1,5 @@ # add -Wall to try to catch everything we can. EXTRA_CFLAGS += -Wall -EXTRA_CFLAGS += -I$(TOP)/motorola/kernel/modules/include +EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include obj-m += sensors_class.o \ No newline at end of file