]> git.sur5r.net Git - u-boot/commitdiff
compat: Remove is_power_of_2() definition
authorFabio Estevam <fabio.estevam@freescale.com>
Thu, 5 Nov 2015 14:43:39 +0000 (12:43 -0200)
committerTom Rini <trini@konsulko.com>
Thu, 5 Nov 2015 21:46:59 +0000 (16:46 -0500)
Use the is_power_of_2() definition from log2.h to align with the
kernel implementation.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Jagan Teki <jteki@openedev.com>
arch/arm/mach-mvebu/mbus.c
drivers/mtd/mtdcore.c
drivers/mtd/ubi/build.c
fs/ubifs/super.c
include/linux/compat.h

index 771cce6fa3b7a381d8400bc196f018fee897439f..346278e1beeb4919202b563686c908b1cea3c7ba 100644 (file)
@@ -52,7 +52,7 @@
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
-#include <linux/compat.h>
+#include <linux/log2.h>
 #include <linux/mbus.h>
 
 /* DDR target is the same on all platforms */
index 2f2172b98781ccbbb047fc68801b65d53c400f59..e3f56e542489a1a93a36674a218fbcefa9604ec8 100644 (file)
 #include <linux/gfp.h>
 #include <linux/slab.h>
 #else
-#include <linux/compat.h>
 #include <linux/err.h>
 #include <ubi_uboot.h>
 #endif
 
+#include <linux/log2.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 
index f0a3b6794222206e7cff03f6b2f2bdc024364c9b..f484e62b32c6c6695ab3af1ba0cebf2433af8e81 100644 (file)
@@ -30,7 +30,7 @@
 #include <linux/slab.h>
 #include <linux/major.h>
 #else
-#include <linux/compat.h>
+#include <linux/log2.h>
 #endif
 #include <linux/err.h>
 #include <ubi_uboot.h>
index c4743135fce8138238a91835371e46f23985941c..abe861a976a81aba4921a5c46771135f0733982c 100644 (file)
@@ -31,7 +31,7 @@
 #include <common.h>
 #include <malloc.h>
 #include <memalign.h>
-#include <linux/compat.h>
+#include <linux/log2.h>
 #include <linux/stat.h>
 #include <linux/err.h>
 #include "ubifs.h"
index 59937de960a37819d8de2057de9e25b55363ebd7..e561ee311a09cd546794524bd91896eb47688084 100644 (file)
@@ -130,12 +130,6 @@ static inline void led_trigger_unregister_simple(struct led_trigger *trigger) {}
 static inline void led_trigger_event(struct led_trigger *trigger,
                                        enum led_brightness event) {}
 
-/* include/linux/log2.h */
-static inline int is_power_of_2(unsigned long n)
-{
-       return (n != 0 && ((n & (n - 1)) == 0));
-}
-
 /* uapi/linux/limits.h */
 #define XATTR_LIST_MAX 65536   /* size of extended attribute namelist (64k) */