Merge tag 'gpio-v5.4-rc5-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kerne...
authorLinus Walleij <linus.walleij@linaro.org>
Wed, 23 Oct 2019 11:29:57 +0000 (13:29 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 23 Oct 2019 11:29:57 +0000 (13:29 +0200)
gpio fixes for v5.4-rc5

- fix building gpio selftests

tools/gpio/Makefile

index 6ecdd10..1178d30 100644 (file)
@@ -3,7 +3,11 @@ include ../scripts/Makefile.include
 
 bindir ?= /usr/bin
 
-ifeq ($(srctree),)
+# This will work when gpio is built in tools env. where srctree
+# isn't set and when invoked from selftests build, where srctree
+# is set to ".". building_out_of_srctree is undefined for in srctree
+# builds
+ifndef building_out_of_srctree
 srctree := $(patsubst %/,%,$(dir $(CURDIR)))
 srctree := $(patsubst %/,%,$(dir $(srctree)))
 endif