diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2016-06-24 11:38:24 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2016-06-28 07:30:04 +0200 |
commit | 94d8236556338c1e9851a703ef9c89b2fd2f15fe (patch) | |
tree | 9ef8e6688c1770b806e66f3ec5dbbc92558bef0f | |
parent | 8b765bebb6aecb363031838d394e360bf11bb009 (diff) | |
download | barebox-94d8236556338c1e9851a703ef9c89b2fd2f15fe.tar.gz barebox-94d8236556338c1e9851a703ef9c89b2fd2f15fe.tar.xz |
mtd: ubi: actually do work in wear leveling code
The actual work in the wear leveling code is done in a separate thread.
Since we do not have threading so far we did not do any of the queued
work. Change this by calling the worker function synchronously.
With this barebox now can write a fastmap on a freshly ubiformated
device.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | drivers/mtd/ubi/wl.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c index 4535f2d804..f24c219819 100644 --- a/drivers/mtd/ubi/wl.c +++ b/drivers/mtd/ubi/wl.c @@ -183,7 +183,6 @@ static void wl_entry_destroy(struct ubi_device *ubi, struct ubi_wl_entry *e) kfree(e); } -#ifndef CONFIG_MTD_UBI_FASTMAP /** * do_work - do one pending work. * @ubi: UBI device description object @@ -221,7 +220,6 @@ static int do_work(struct ubi_device *ubi) return err; } -#endif /** * in_wl_tree - check if wear-leveling entry is present in a WL RB-tree. @@ -523,8 +521,9 @@ static void __schedule_ubi_work(struct ubi_device *ubi, struct ubi_work *wrk) list_add_tail(&wrk->list, &ubi->works); ubi_assert(ubi->works_count >= 0); ubi->works_count += 1; - if (ubi->thread_enabled && !ubi_dbg_is_bgt_disabled(ubi)) - wake_up_process(ubi->bgt_thread); + + /* No threading in barebox, so do work synchronously */ + do_work(ubi); } /** |