[PATCH] spi: tools: make a symbolic link to the header file spi.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Quanyang Wang <quanyang.wang@xxxxxxxxxxxxx>

The header file spi.h in include/uapi/linux/spi is needed for spidev.h,
so we also need make a symbolic link to it to eliminate the error message
as below:

In file included from spidev_test.c:24:
include/linux/spi/spidev.h:28:10: fatal error: linux/spi/spi.h: No such file or directory
   28 | #include <linux/spi/spi.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.

Fixes: f7005142dace ("spi: uapi: unify SPI modes into a single spi.h")
Signed-off-by: Quanyang Wang <quanyang.wang@xxxxxxxxxxxxx>
---
 tools/spi/Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/spi/Makefile b/tools/spi/Makefile
index ada881afb489..0aa6dbd31fb8 100644
--- a/tools/spi/Makefile
+++ b/tools/spi/Makefile
@@ -25,11 +25,12 @@ include $(srctree)/tools/build/Makefile.include
 #
 # We need the following to be outside of kernel tree
 #
-$(OUTPUT)include/linux/spi/spidev.h: ../../include/uapi/linux/spi/spidev.h
+$(OUTPUT)include/linux/spi: ../../include/uapi/linux/spi
 	mkdir -p $(OUTPUT)include/linux/spi 2>&1 || true
 	ln -sf $(CURDIR)/../../include/uapi/linux/spi/spidev.h $@
+	ln -sf $(CURDIR)/../../include/uapi/linux/spi/spi.h $@
 
-prepare: $(OUTPUT)include/linux/spi/spidev.h
+prepare: $(OUTPUT)include/linux/spi
 
 #
 # spidev_test
-- 
2.25.1




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux