summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/gpio
diff options
context:
space:
mode:
authorKent Gibson <warthog618@gmail.com>2022-07-19 14:06:01 +0300
committerBartosz Golaszewski <brgl@bgdev.pl>2022-07-20 15:35:18 +0300
commitf63731e18e8d8350e05b0176e39a76639f6483c7 (patch)
tree191ead30c8fed09ed104ad54a7187fe07fc79ad9 /tools/testing/selftests/gpio
parentb8c768ccdd8338504fb78370747728d5002b1b5a (diff)
downloadlinux-f63731e18e8d8350e05b0176e39a76639f6483c7.tar.xz
selftests: gpio: fix include path to kernel headers for out of tree builds
When building selftests out of the kernel tree the gpio.h the include path is incorrect and the build falls back to the system includes which may be outdated. Add the KHDR_INCLUDES to the CFLAGS to include the gpio.h from the build tree. Fixes: 4f4d0af7b2d9 ("selftests: gpio: restore CFLAGS options") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Kent Gibson <warthog618@gmail.com> Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Diffstat (limited to 'tools/testing/selftests/gpio')
-rw-r--r--tools/testing/selftests/gpio/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/gpio/Makefile b/tools/testing/selftests/gpio/Makefile
index 71b306602368..616ed4019655 100644
--- a/tools/testing/selftests/gpio/Makefile
+++ b/tools/testing/selftests/gpio/Makefile
@@ -3,6 +3,6 @@
TEST_PROGS := gpio-mockup.sh gpio-sim.sh
TEST_FILES := gpio-mockup-sysfs.sh
TEST_GEN_PROGS_EXTENDED := gpio-mockup-cdev gpio-chip-info gpio-line-name
-CFLAGS += -O2 -g -Wall -I../../../../usr/include/
+CFLAGS += -O2 -g -Wall -I../../../../usr/include/ $(KHDR_INCLUDES)
include ../lib.mk