diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2024-01-18 18:57:04 +0100 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2024-01-18 19:19:56 +0100 |
commit | b62a70371a08cf0e216783cb3f8ddf516d2a8e5b (patch) | |
tree | 0caeef6287406427f2635622c3e87fd136869187 /include/spi-mem.h | |
parent | 9bdb65ea0102b447fd4795f2034b84c2d475faf7 (diff) |
headers: don't depend on errno.h being available
These headers follow the pattern:
| #if CONFIG_IS_ENABLED(FANCY_FEATURE)
| void foo(void);
| #else
| static inline void foo(void) { return -ENOSYS; }
| #endif
In the #else path ENOSYS is used, however linux/errno.h is not included.
If errno.h has not been included already the compiler errors out even
if the inline function is not referenced.
Make those headers self contained.
Upstream-Status: Submitted [https://lore.kernel.org/all/20240118181106.4133924-1-max.oss.09@gmail.com/T/#u]
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'include/spi-mem.h')
-rw-r--r-- | include/spi-mem.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/spi-mem.h b/include/spi-mem.h index 6b969919b6..fae7dfcaa4 100644 --- a/include/spi-mem.h +++ b/include/spi-mem.h @@ -11,6 +11,8 @@ #ifndef __UBOOT_SPI_MEM_H #define __UBOOT_SPI_MEM_H +#include <linux/errno.h> + struct udevice; #define SPI_MEM_OP_DTR .dtr = 1 |