summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorTeresa Remmet <t.remmet@phytec.de>2016-05-27 09:44:55 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2016-05-27 12:30:27 +0200
commit31edb3f16d79a285fa61a188be3f1fe4d2ce9994 (patch)
tree296a8602069fb059496ddf369a924d2bd02288a0 /drivers/mtd
parent58eb46f7cb62bc533d9f80145e4a850adaa7f64b (diff)
downloadbarebox-31edb3f16d79a285fa61a188be3f1fe4d2ce9994.tar.gz
barebox-31edb3f16d79a285fa61a188be3f1fe4d2ce9994.tar.xz
mtd: UBI: Remove ubi_free_fastmap
Freeing the fastmap is now done by ubi_fastmap_close() from kernel. No need to keep the barebox own fastmap free function. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/ubi/build.c1
-rw-r--r--drivers/mtd/ubi/fastmap.c14
-rw-r--r--drivers/mtd/ubi/ubi.h1
3 files changed, 0 insertions, 16 deletions
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index 0e8dccc103..5953e36bce 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -723,7 +723,6 @@ int ubi_detach_mtd_dev(int ubi_num, int anyway)
/* If we don't write a new fastmap at detach time we lose all
* EC updates that have been made since the last written fastmap. */
ubi_update_fastmap(ubi);
- ubi_free_fastmap(ubi);
#endif
uif_close(ubi);
diff --git a/drivers/mtd/ubi/fastmap.c b/drivers/mtd/ubi/fastmap.c
index ffa2859fe0..9975722698 100644
--- a/drivers/mtd/ubi/fastmap.c
+++ b/drivers/mtd/ubi/fastmap.c
@@ -1247,20 +1247,6 @@ out:
return ret;
}
-void ubi_free_fastmap(struct ubi_device *ubi)
-{
- struct ubi_fastmap_layout *fm = ubi->fm;
- int i;
-
- if (!fm)
- return;
-
- for (i = 0; i < fm->used_blocks; i++)
- kfree(fm->e[i]);
-
- kfree(ubi->fm);
-}
-
/**
* erase_block - Manually erase a PEB.
* @ubi: UBI device object
diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h
index 8b5416cfa5..89e3347012 100644
--- a/drivers/mtd/ubi/ubi.h
+++ b/drivers/mtd/ubi/ubi.h
@@ -842,7 +842,6 @@ size_t ubi_calc_fm_size(struct ubi_device *ubi);
int ubi_update_fastmap(struct ubi_device *ubi);
int ubi_scan_fastmap(struct ubi_device *ubi, struct ubi_attach_info *ai,
int fm_anchor);
-void ubi_free_fastmap(struct ubi_device *ubi);
#else
static inline int ubi_update_fastmap(struct ubi_device *ubi) { return 0; }
#endif