kernel.h: Move ARRAY_SIZE() to a separate header
[linux-2.6-microblaze.git] / include / linux / kernel.h
index cee8fe8..d9ad210 100644 (file)
@@ -13,6 +13,7 @@
 
 #include <linux/stdarg.h>
 #include <linux/align.h>
+#include <linux/array_size.h>
 #include <linux/limits.h>
 #include <linux/linkage.h>
 #include <linux/stddef.h>
 #define READ                   0
 #define WRITE                  1
 
-/**
- * ARRAY_SIZE - get the number of elements in array @arr
- * @arr: array to be sized
- */
-#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
-
 #define PTR_IF(cond, ptr)      ((cond) ? (ptr) : NULL)
 
 #define u64_to_user_ptr(x) (           \