summaryrefslogtreecommitdiff
path: root/common/cmd_ext_common.c
diff options
context:
space:
mode:
authorRob Herring <rob.herring@calxeda.com>2012-08-23 11:31:45 +0000
committerTom Rini <trini@ti.com>2012-09-25 14:46:35 -0700
commit945010629641b00cca95d1fed4f63009a2b4a113 (patch)
tree84ea14ad3f81b39a8d65640bf10d6851e103f96e /common/cmd_ext_common.c
parent99d2c205d4a151faf5f9a406316b9dd960f43475 (diff)
downloadu-boot-imx-945010629641b00cca95d1fed4f63009a2b4a113.zip
u-boot-imx-945010629641b00cca95d1fed4f63009a2b4a113.tar.gz
u-boot-imx-945010629641b00cca95d1fed4f63009a2b4a113.tar.bz2
ext4: remove init_fs/deinit_fs
There's no real need to expose this and it can be removed by using a static allocation. Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Diffstat (limited to 'common/cmd_ext_common.c')
-rw-r--r--common/cmd_ext_common.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/common/cmd_ext_common.c b/common/cmd_ext_common.c
index 56ee9a5..8972ccc 100644
--- a/common/cmd_ext_common.c
+++ b/common/cmd_ext_common.c
@@ -75,7 +75,6 @@ int do_ext_load(cmd_tbl_t *cmdtp, int flag, int argc,
ulong part_length;
int filelen;
disk_partition_t info;
- struct ext_filesystem *fs;
char buf[12];
unsigned long count;
const char *addr_str;
@@ -117,10 +116,7 @@ int do_ext_load(cmd_tbl_t *cmdtp, int flag, int argc,
printf("** Block device %s %d not supported\n", argv[1], dev);
return 1;
}
- if (init_fs(ext4_dev_desc))
- return 1;
- fs = get_fs();
if (*ep) {
if (*ep != ':') {
puts("** Invalid boot device, use `dev[:part]' **\n");
@@ -130,7 +126,7 @@ int do_ext_load(cmd_tbl_t *cmdtp, int flag, int argc,
}
if (part != 0) {
- if (get_partition_info(fs->dev_desc, part, &info)) {
+ if (get_partition_info(ext4_dev_desc, part, &info)) {
printf("** Bad partition %lu **\n", part);
goto fail;
}
@@ -149,7 +145,7 @@ int do_ext_load(cmd_tbl_t *cmdtp, int flag, int argc,
filename, argv[1], dev);
}
- part_length = ext4fs_set_blk_dev(fs->dev_desc, part);
+ part_length = ext4fs_set_blk_dev(ext4_dev_desc, part);
if (part_length == 0) {
printf("**Bad partition - %s %d:%lu **\n", argv[1], dev, part);
ext4fs_close();
@@ -180,7 +176,6 @@ int do_ext_load(cmd_tbl_t *cmdtp, int flag, int argc,
}
ext4fs_close();
- deinit_fs(fs->dev_desc);
/* Loading ok, update default load address */
load_addr = addr;
@@ -190,7 +185,6 @@ int do_ext_load(cmd_tbl_t *cmdtp, int flag, int argc,
return 0;
fail:
- deinit_fs(fs->dev_desc);
return 1;
}
@@ -200,7 +194,6 @@ int do_ext_ls(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
int dev;
unsigned long part = 1;
char *ep;
- struct ext_filesystem *fs;
int part_length;
if (argc < 3)
return cmd_usage(cmdtp);
@@ -214,10 +207,6 @@ int do_ext_ls(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
return 1;
}
- if (init_fs(ext4_dev_desc))
- return 1;
-
- fs = get_fs();
if (*ep) {
if (*ep != ':') {
puts("\n** Invalid boot device, use `dev[:part]' **\n");
@@ -229,7 +218,7 @@ int do_ext_ls(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
if (argc == 4)
filename = argv[3];
- part_length = ext4fs_set_blk_dev(fs->dev_desc, part);
+ part_length = ext4fs_set_blk_dev(ext4_dev_desc, part);
if (part_length == 0) {
printf("** Bad partition - %s %d:%lu **\n", argv[1], dev, part);
ext4fs_close();
@@ -250,10 +239,8 @@ int do_ext_ls(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
};
ext4fs_close();
- deinit_fs(fs->dev_desc);
return 0;
fail:
- deinit_fs(fs->dev_desc);
return 1;
}