summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/Makefile4
-rw-r--r--fs/fat/Makefile4
-rw-r--r--fs/fat/fat.c3
-rw-r--r--fs/fs.c8
4 files changed, 10 insertions, 9 deletions
diff --git a/fs/Makefile b/fs/Makefile
index f21cd23f03..10c735ad43 100644
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -6,8 +6,8 @@
ifdef CONFIG_SPL_BUILD
obj-$(CONFIG_FS_LOADER) += fs.o
-obj-$(CONFIG_SPL_FAT_SUPPORT) += fat/
-obj-$(CONFIG_SPL_EXT_SUPPORT) += ext4/
+obj-$(CONFIG_SPL_FS_FAT) += fat/
+obj-$(CONFIG_SPL_FS_EXT4) += ext4/
else
obj-y += fs.o
diff --git a/fs/fat/Makefile b/fs/fat/Makefile
index e64b61a0b4..f84efaccc7 100644
--- a/fs/fat/Makefile
+++ b/fs/fat/Makefile
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
-obj-$(CONFIG_FS_FAT) := fat.o
-obj-$(CONFIG_FAT_WRITE):= fat_write.o
+obj-$(CONFIG_$(SPL_)FS_FAT) = fat.o
+obj-$(CONFIG_$(SPL_)FAT_WRITE) = fat_write.o
diff --git a/fs/fat/fat.c b/fs/fat/fat.c
index 179bf4f3d8..dac86ea516 100644
--- a/fs/fat/fat.c
+++ b/fs/fat/fat.c
@@ -145,7 +145,8 @@ static void get_name(dir_entry *dirent, char *s_name)
}
static int flush_dirty_fat_buffer(fsdata *mydata);
-#if !defined(CONFIG_FAT_WRITE)
+
+#if !CONFIG_IS_ENABLED(FAT_WRITE)
/* Stub for read only operation */
int flush_dirty_fat_buffer(fsdata *mydata)
{
diff --git a/fs/fs.c b/fs/fs.c
index 7fd22101ef..0e9c2f1062 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -168,7 +168,7 @@ static struct fstype_info fstypes[] = {
.exists = fat_exists,
.size = fat_size,
.read = fat_read_file,
-#ifdef CONFIG_FAT_WRITE
+#if CONFIG_IS_ENABLED(FAT_WRITE)
.write = file_fat_write,
.unlink = fat_unlink,
.mkdir = fat_mkdir,
@@ -183,7 +183,8 @@ static struct fstype_info fstypes[] = {
.closedir = fat_closedir,
},
#endif
-#ifdef CONFIG_FS_EXT4
+
+#if CONFIG_IS_ENABLED(FS_EXT4)
{
.fstype = FS_TYPE_EXT,
.name = "ext4",
@@ -453,8 +454,7 @@ static int fs_read_lmb_check(const char *filename, ulong addr, loff_t offset,
if (len && len < read_len)
read_len = len;
- lmb_init_and_reserve(&lmb, gd->bd->bi_dram[0].start,
- gd->bd->bi_dram[0].size, (void *)gd->fdt_blob);
+ lmb_init_and_reserve(&lmb, gd->bd, (void *)gd->fdt_blob);
lmb_dump_all(&lmb);
if (lmb_alloc_addr(&lmb, addr, read_len) == addr)