summaryrefslogtreecommitdiff
path: root/fs
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 /fs
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 'fs')
-rw-r--r--fs/ext4/ext4fs.c36
1 files changed, 2 insertions, 34 deletions
diff --git a/fs/ext4/ext4fs.c b/fs/ext4/ext4fs.c
index 114c2a2..c366e6f 100644
--- a/fs/ext4/ext4fs.c
+++ b/fs/ext4/ext4fs.c
@@ -44,43 +44,11 @@
int ext4fs_symlinknest;
block_dev_desc_t *ext4_dev_desc;
+struct ext_filesystem ext_fs;
struct ext_filesystem *get_fs(void)
{
- if (ext4_dev_desc == NULL || ext4_dev_desc->priv == NULL)
- printf("Invalid Input Arguments %s\n", __func__);
-
- return ext4_dev_desc->priv;
-}
-
-int init_fs(block_dev_desc_t *dev_desc)
-{
- struct ext_filesystem *fs;
- if (dev_desc == NULL) {
- printf("Invalid Input Arguments %s\n", __func__);
- return -EINVAL;
- }
-
- fs = zalloc(sizeof(struct ext_filesystem));
- if (fs == NULL) {
- printf("malloc failed: %s\n", __func__);
- return -ENOMEM;
- }
-
- fs->dev_desc = dev_desc;
- dev_desc->priv = fs;
-
- return 0;
-}
-
-void deinit_fs(block_dev_desc_t *dev_desc)
-{
- if (dev_desc == NULL) {
- printf("Invalid Input Arguments %s\n", __func__);
- return;
- }
- free(dev_desc->priv);
- dev_desc->priv = NULL;
+ return &ext_fs;
}
void ext4fs_free_node(struct ext2fs_node *node, struct ext2fs_node *currroot)