]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Add an assembly guard around linux/bitops.h
authorSimon Glass <sjg@chromium.org>
Wed, 4 Nov 2020 16:57:14 +0000 (09:57 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Thu, 5 Nov 2020 06:58:45 +0000 (14:58 +0800)
This file can be included by any header but it includes C code. Guard it
to avoid errors when compiling ASL, etc.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
include/linux/bitops.h

index 6b509dce58a4fc6ffa1b0e70d938836da8014cb7..16f28993f5ec9065e966834858e69126dadcebab 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef _LINUX_BITOPS_H
 #define _LINUX_BITOPS_H
 
-#ifndef USE_HOSTCC
+#if !defined(USE_HOSTCC) && !defined(__ASSEMBLY__)
 
 #include <asm/types.h>
 #include <asm-generic/bitsperlong.h>
@@ -218,6 +218,6 @@ static inline void generic_clear_bit(int nr, volatile unsigned long *addr)
        *p &= ~mask;
 }
 
-#endif /* !USE_HOSTCC */
+#endif /* !USE_HOSTCC && !__ASSEMBLY__ */
 
 #endif