summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-02-03 07:36:16 -0700
committerSimon Glass <sjg@chromium.org>2020-02-05 19:33:46 -0700
commit336d4615f8fa774557d14f9b3245daa9e5fe3dbc (patch)
tree7a4d2d33113f44238d64e7e409fd3aafef63c2ed /fs
parent61b29b82683863a970fd4609a7c58512872616bc (diff)
downloadu-boot-336d4615f8fa774557d14f9b3245daa9e5fe3dbc.tar.gz
u-boot-336d4615f8fa774557d14f9b3245daa9e5fe3dbc.tar.xz
u-boot-336d4615f8fa774557d14f9b3245daa9e5fe3dbc.zip
dm: core: Create a new header file for 'compat' features
At present dm/device.h includes the linux-compatible features. This requires including linux/compat.h which in turn includes a lot of headers. One of these is malloc.h which we thus end up including in every file in U-Boot. Apart from the inefficiency of this, it is problematic for sandbox which needs to use the system malloc() in some files. Move the compatibility features into a separate header file. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/ext4/ext4_write.c1
-rw-r--r--fs/ext4/ext4fs.c1
-rw-r--r--fs/fat/fat_write.c1
-rw-r--r--fs/sandbox/sandboxfs.c1
-rw-r--r--fs/ubifs/lprops.c1
-rw-r--r--fs/ubifs/ubifs.c1
-rw-r--r--fs/yaffs2/yaffs_nandif.c1
-rw-r--r--fs/yaffs2/yaffs_uboot_glue.c1
8 files changed, 8 insertions, 0 deletions
diff --git a/fs/ext4/ext4_write.c b/fs/ext4/ext4_write.c
index 3368bd8c00..67aeba1339 100644
--- a/fs/ext4/ext4_write.c
+++ b/fs/ext4/ext4_write.c
@@ -22,6 +22,7 @@
#include <common.h>
+#include <malloc.h>
#include <memalign.h>
#include <linux/stat.h>
#include <div64.h>
diff --git a/fs/ext4/ext4fs.c b/fs/ext4/ext4fs.c
index 37b31d9f0f..1c616a26a2 100644
--- a/fs/ext4/ext4fs.c
+++ b/fs/ext4/ext4fs.c
@@ -25,6 +25,7 @@
#include <ext4fs.h>
#include "ext4_common.h"
#include <div64.h>
+#include <malloc.h>
int ext4fs_symlinknest;
struct ext_filesystem ext_fs;
diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c
index 729cf39630..320a8a7a87 100644
--- a/fs/fat/fat_write.c
+++ b/fs/fat/fat_write.c
@@ -9,6 +9,7 @@
#include <command.h>
#include <config.h>
#include <fat.h>
+#include <malloc.h>
#include <asm/byteorder.h>
#include <part.h>
#include <linux/ctype.h>
diff --git a/fs/sandbox/sandboxfs.c b/fs/sandbox/sandboxfs.c
index 1e253611c3..af47224b6c 100644
--- a/fs/sandbox/sandboxfs.c
+++ b/fs/sandbox/sandboxfs.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <fs.h>
+#include <malloc.h>
#include <os.h>
int sandbox_fs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info)
diff --git a/fs/ubifs/lprops.c b/fs/ubifs/lprops.c
index 5473d33997..a7c45dd5ec 100644
--- a/fs/ubifs/lprops.c
+++ b/fs/ubifs/lprops.c
@@ -17,6 +17,7 @@
*/
#ifdef __UBOOT__
+#include <malloc.h>
#include <linux/err.h>
#endif
#include "ubifs.h"
diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c
index 388451512a..e097d28444 100644
--- a/fs/ubifs/ubifs.c
+++ b/fs/ubifs/ubifs.c
@@ -14,6 +14,7 @@
#include <common.h>
#include <env.h>
#include <gzip.h>
+#include <malloc.h>
#include <memalign.h>
#include "ubifs.h"
#include <dm/devres.h>
diff --git a/fs/yaffs2/yaffs_nandif.c b/fs/yaffs2/yaffs_nandif.c
index 79b00ab3b7..ee5a172060 100644
--- a/fs/yaffs2/yaffs_nandif.c
+++ b/fs/yaffs2/yaffs_nandif.c
@@ -13,6 +13,7 @@
#include "yportenv.h"
#include "yaffs_guts.h"
+#include <malloc.h>
#include "yaffs_nandif.h"
diff --git a/fs/yaffs2/yaffs_uboot_glue.c b/fs/yaffs2/yaffs_uboot_glue.c
index 2a70e4a543..7a15a02974 100644
--- a/fs/yaffs2/yaffs_uboot_glue.c
+++ b/fs/yaffs2/yaffs_uboot_glue.c
@@ -21,6 +21,7 @@
#include <common.h>
#include <div64.h>
+#include <malloc.h>
#include <config.h>
#include "nand.h"