From 336d4615f8fa774557d14f9b3245daa9e5fe3dbc Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 3 Feb 2020 07:36:16 -0700 Subject: 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 --- fs/ext4/ext4_write.c | 1 + fs/ext4/ext4fs.c | 1 + fs/fat/fat_write.c | 1 + fs/sandbox/sandboxfs.c | 1 + fs/ubifs/lprops.c | 1 + fs/ubifs/ubifs.c | 1 + fs/yaffs2/yaffs_nandif.c | 1 + fs/yaffs2/yaffs_uboot_glue.c | 1 + 8 files changed, 8 insertions(+) (limited to 'fs') diff --git a/fs/ext4/ext4_write.c b/fs/ext4/ext4_write.c index 3368bd8..67aeba1 100644 --- a/fs/ext4/ext4_write.c +++ b/fs/ext4/ext4_write.c @@ -22,6 +22,7 @@ #include +#include #include #include #include diff --git a/fs/ext4/ext4fs.c b/fs/ext4/ext4fs.c index 37b31d9..1c616a2 100644 --- a/fs/ext4/ext4fs.c +++ b/fs/ext4/ext4fs.c @@ -25,6 +25,7 @@ #include #include "ext4_common.h" #include +#include int ext4fs_symlinknest; struct ext_filesystem ext_fs; diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c index 729cf39..320a8a7 100644 --- a/fs/fat/fat_write.c +++ b/fs/fat/fat_write.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/fs/sandbox/sandboxfs.c b/fs/sandbox/sandboxfs.c index 1e25361..af47224 100644 --- a/fs/sandbox/sandboxfs.c +++ b/fs/sandbox/sandboxfs.c @@ -5,6 +5,7 @@ #include #include +#include #include 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 5473d33..a7c45dd 100644 --- a/fs/ubifs/lprops.c +++ b/fs/ubifs/lprops.c @@ -17,6 +17,7 @@ */ #ifdef __UBOOT__ +#include #include #endif #include "ubifs.h" diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c index 3884515..e097d28 100644 --- a/fs/ubifs/ubifs.c +++ b/fs/ubifs/ubifs.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include "ubifs.h" #include diff --git a/fs/yaffs2/yaffs_nandif.c b/fs/yaffs2/yaffs_nandif.c index 79b00ab..ee5a172 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 #include "yaffs_nandif.h" diff --git a/fs/yaffs2/yaffs_uboot_glue.c b/fs/yaffs2/yaffs_uboot_glue.c index 2a70e4a..7a15a02 100644 --- a/fs/yaffs2/yaffs_uboot_glue.c +++ b/fs/yaffs2/yaffs_uboot_glue.c @@ -21,6 +21,7 @@ #include #include +#include #include #include "nand.h" -- cgit v1.1