mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
spi: spidev_test: include tools/include
Add tools/include to include paths to allow using macro helpers.
Use ARRAY_SIZE() from tools/include/linux/kernel.h instead of
maintaining a copy.
Remove the obsolete comment with cross-compile instructions from the
header since spidev_test is integrated with the tools buildsystem since
commit f325b73dc4 ("spi: tools: move to tools buildsystem").
Signed-off-by: Jonas Rebmann <jre@pengutronix.de>
Link: https://patch.msgid.link/20260924-spi-sun4i-spidev_test-v7-1-126e31a07fdc@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
93f51579e7
commit
88ca7a587f
|
|
@ -12,7 +12,7 @@ endif
|
|||
# (this improves performance and avoids hard-to-debug behaviour);
|
||||
MAKEFLAGS += -r
|
||||
|
||||
CFLAGS += -O2 -Wall -g -D_GNU_SOURCE -I$(OUTPUT)include
|
||||
CFLAGS += -O2 -Wall -g -D_GNU_SOURCE -I$(OUTPUT)include -I$(srctree)/tools/include
|
||||
|
||||
ALL_TARGETS := spidev_test spidev_fdx
|
||||
ALL_PROGRAMS := $(patsubst %,$(OUTPUT)%,$(ALL_TARGETS))
|
||||
|
|
|
|||
|
|
@ -4,8 +4,6 @@
|
|||
*
|
||||
* Copyright (c) 2007 MontaVista Software, Inc.
|
||||
* Copyright (c) 2007 Anton Vorontsov <avorontsov@ru.mvista.com>
|
||||
*
|
||||
* Cross-compile with cross-gcc -I/path/to/cross-kernel/include
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
|
|
@ -22,8 +20,7 @@
|
|||
#include <sys/stat.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/spi/spidev.h>
|
||||
|
||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
|
||||
#include <linux/kernel.h>
|
||||
|
||||
static void pabort(const char *s)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user