linux/compat.h: rename from linux/mtd/compat.h
authorMike Frysinger <vapier@gentoo.org>
Mon, 9 Apr 2012 13:39:55 +0000 (13:39 +0000)
committerAnatolij Gustschin <agust@denx.de>
Mon, 30 Apr 2012 14:54:51 +0000 (16:54 +0200)
This lets us use it in more places than just mtd code.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
21 files changed:
board/samsung/smdkc100/onenand.c
common/cmd_onenand.c
common/env_onenand.c
drivers/mtd/mtdconcat.c
drivers/mtd/mtdcore.c
drivers/mtd/mtdpart.c
drivers/mtd/nand/mpc5121_nfc.c
drivers/mtd/nand/nand_base.c
drivers/mtd/nand/nand_bbt.c
drivers/mtd/onenand/onenand_base.c
drivers/mtd/onenand/onenand_bbt.c
drivers/mtd/onenand/onenand_uboot.c
drivers/mtd/onenand/samsung.c
fs/jffs2/jffs2_1pass.c
include/linux/compat.h [new file with mode: 0644]
include/linux/err.h
include/linux/mtd/compat.h [deleted file]
include/linux/mtd/mtd-abi.h
include/linux/mtd/nand.h
include/linux/mtd/onenand.h
include/nand.h

index 501855e..e34cd31 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 #include <common.h>
-#include <linux/mtd/compat.h>
+#include <linux/compat.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/onenand.h>
 #include <linux/mtd/samsung_onenand.h>
index 0f2e208..a0d25e5 100644 (file)
@@ -13,7 +13,7 @@
 #include <command.h>
 #include <malloc.h>
 
-#include <linux/mtd/compat.h>
+#include <linux/compat.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/onenand.h>
 
index 652665a..7197ab6 100644 (file)
@@ -33,7 +33,7 @@
 #include <errno.h>
 #include <onenand_uboot.h>
 
-#include <linux/mtd/compat.h>
+#include <linux/compat.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/onenand.h>
 
index fc22701..e6d9384 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #include <linux/mtd/mtd.h>
-#include <linux/mtd/compat.h>
+#include <linux/compat.h>
 #include <linux/mtd/concat.h>
 #include <ubi_uboot.h>
 
index a195dda..3a81ada 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <linux/mtd/mtd.h>
-#include <linux/mtd/compat.h>
+#include <linux/compat.h>
 #include <ubi_uboot.h>
 
 struct mtd_info *mtd_table[MAX_MTD_DEVICES];
index f647e43..96dcda2 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/list.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
-#include <linux/mtd/compat.h>
+#include <linux/compat.h>
 
 /* Our partition linked list */
 struct list_head mtd_partitions;
index 7fd8a35..e6b7a70 100644 (file)
@@ -29,7 +29,7 @@
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/nand.h>
 #include <linux/mtd/nand_ecc.h>
-#include <linux/mtd/compat.h>
+#include <linux/compat.h>
 
 #include <asm/errno.h>
 #include <asm/io.h>
index 44f7b91..bef79be 100644 (file)
@@ -39,7 +39,7 @@
 #include <malloc.h>
 #include <watchdog.h>
 #include <linux/err.h>
-#include <linux/mtd/compat.h>
+#include <linux/compat.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/nand.h>
 #include <linux/mtd/nand_ecc.h>
index 2b730e0..dc6c648 100644 (file)
@@ -61,7 +61,7 @@
 
 #include <common.h>
 #include <malloc.h>
-#include <linux/mtd/compat.h>
+#include <linux/compat.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/nand.h>
 #include <linux/mtd/nand_ecc.h>
index 1d0f196..1a7b40e 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 #include <common.h>
-#include <linux/mtd/compat.h>
+#include <linux/compat.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/onenand.h>
 
index 1354877..9d5da54 100644 (file)
@@ -15,7 +15,7 @@
  */
 
 #include <common.h>
-#include <linux/mtd/compat.h>
+#include <linux/compat.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/onenand.h>
 #include <malloc.h>
index c642016..ae60c3b 100644 (file)
@@ -14,7 +14,7 @@
  */
 
 #include <common.h>
-#include <linux/mtd/compat.h>
+#include <linux/compat.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/onenand.h>
 
index c9d33ec..0d94ea5 100644 (file)
@@ -28,7 +28,7 @@
 
 #include <common.h>
 #include <malloc.h>
-#include <linux/mtd/compat.h>
+#include <linux/compat.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/onenand.h>
 #include <linux/mtd/samsung_onenand.h>
index a0b02e4..c856983 100644 (file)
 #include <watchdog.h>
 #include <jffs2/jffs2.h>
 #include <jffs2/jffs2_1pass.h>
-#include <linux/mtd/compat.h>
+#include <linux/compat.h>
 #include <asm/errno.h>
 
 #include "jffs2_private.h"
diff --git a/include/linux/compat.h b/include/linux/compat.h
new file mode 100644 (file)
index 0000000..39c693f
--- /dev/null
@@ -0,0 +1,52 @@
+#ifndef _LINUX_COMPAT_H_
+#define _LINUX_COMPAT_H_
+
+#define __user
+#define __iomem
+
+#define ndelay(x)      udelay(1)
+
+#define printk printf
+
+#define KERN_EMERG
+#define KERN_ALERT
+#define KERN_CRIT
+#define KERN_ERR
+#define KERN_WARNING
+#define KERN_NOTICE
+#define KERN_INFO
+#define KERN_DEBUG
+
+#define kmalloc(size, flags)   malloc(size)
+#define kzalloc(size, flags)   calloc(size, 1)
+#define vmalloc(size)          malloc(size)
+#define kfree(ptr)             free(ptr)
+#define vfree(ptr)             free(ptr)
+
+#define DECLARE_WAITQUEUE(...) do { } while (0)
+#define add_wait_queue(...)    do { } while (0)
+#define remove_wait_queue(...) do { } while (0)
+
+#define KERNEL_VERSION(a,b,c)  (((a) << 16) + ((b) << 8) + (c))
+
+/*
+ * ..and if you can't take the strict
+ * types, you can specify one yourself.
+ *
+ * Or not use min/max at all, of course.
+ */
+#define min_t(type,x,y) \
+       ({ type __x = (x); type __y = (y); __x < __y ? __x: __y; })
+#define max_t(type,x,y) \
+       ({ type __x = (x); type __y = (y); __x > __y ? __x: __y; })
+
+#ifndef BUG
+#define BUG() do { \
+       printf("U-Boot BUG at %s:%d!\n", __FILE__, __LINE__); \
+} while (0)
+
+#define BUG_ON(condition) do { if (condition) BUG(); } while(0)
+#endif /* BUG */
+
+#define PAGE_SIZE      4096
+#endif
index 4e08c4f..96c0c72 100644 (file)
@@ -5,7 +5,7 @@
 #if 0
 #include <linux/compiler.h>
 #else
-#include <linux/mtd/compat.h>
+#include <linux/compat.h>
 #endif
 
 #include <asm/errno.h>
diff --git a/include/linux/mtd/compat.h b/include/linux/mtd/compat.h
deleted file mode 100644 (file)
index 39c693f..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#ifndef _LINUX_COMPAT_H_
-#define _LINUX_COMPAT_H_
-
-#define __user
-#define __iomem
-
-#define ndelay(x)      udelay(1)
-
-#define printk printf
-
-#define KERN_EMERG
-#define KERN_ALERT
-#define KERN_CRIT
-#define KERN_ERR
-#define KERN_WARNING
-#define KERN_NOTICE
-#define KERN_INFO
-#define KERN_DEBUG
-
-#define kmalloc(size, flags)   malloc(size)
-#define kzalloc(size, flags)   calloc(size, 1)
-#define vmalloc(size)          malloc(size)
-#define kfree(ptr)             free(ptr)
-#define vfree(ptr)             free(ptr)
-
-#define DECLARE_WAITQUEUE(...) do { } while (0)
-#define add_wait_queue(...)    do { } while (0)
-#define remove_wait_queue(...) do { } while (0)
-
-#define KERNEL_VERSION(a,b,c)  (((a) << 16) + ((b) << 8) + (c))
-
-/*
- * ..and if you can't take the strict
- * types, you can specify one yourself.
- *
- * Or not use min/max at all, of course.
- */
-#define min_t(type,x,y) \
-       ({ type __x = (x); type __y = (y); __x < __y ? __x: __y; })
-#define max_t(type,x,y) \
-       ({ type __x = (x); type __y = (y); __x > __y ? __x: __y; })
-
-#ifndef BUG
-#define BUG() do { \
-       printf("U-Boot BUG at %s:%d!\n", __FILE__, __LINE__); \
-} while (0)
-
-#define BUG_ON(condition) do { if (condition) BUG(); } while(0)
-#endif /* BUG */
-
-#define PAGE_SIZE      4096
-#endif
index 8d5f60c..5991157 100644 (file)
@@ -8,7 +8,7 @@
 #define __MTD_ABI_H__
 
 #if 1
-#include <linux/mtd/compat.h>
+#include <linux/compat.h>
 #endif
 
 struct erase_info_user {
index da6fa18..82704de 100644 (file)
@@ -20,7 +20,7 @@
 
 #include "config.h"
 
-#include "linux/mtd/compat.h"
+#include "linux/compat.h"
 #include "linux/mtd/mtd.h"
 #include "linux/mtd/bbm.h"
 
index bb4a4a6..e7b63dd 100644 (file)
@@ -17,7 +17,7 @@
 /* Note: The header order is impoertant */
 #include <onenand_uboot.h>
 
-#include <linux/mtd/compat.h>
+#include <linux/compat.h>
 #include <linux/mtd/bbm.h>
 
 #define MAX_DIES               2
index 8b3a1a7..a48b1b8 100644 (file)
@@ -37,7 +37,7 @@
 
 extern void nand_init(void);
 
-#include <linux/mtd/compat.h>
+#include <linux/compat.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/nand.h>