aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/ubi.h
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-12-18 08:54:35 -0500
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-12-26 12:15:16 -0500
commit593dd33c92c6529443d5df1350dc5cc76511232d (patch)
treedda360da5a5f66eb36b55a4c2e8eb985e997ffd6 /drivers/mtd/ubi/ubi.h
parent458dbb3d07574e8fcdcb921ac155ccd81b16b05f (diff)
UBI: fix ubi_wl_flush
The flush function should finish all the pending jobs. But if somebody else is doing a work, this function should wait and let it finish. This patche uses rw semaphore for synchronization purpose - it just looks quite convinient. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi/ubi.h')
-rw-r--r--drivers/mtd/ubi/ubi.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h
index ea9a6990a4dc..994233d6e1e3 100644
--- a/drivers/mtd/ubi/ubi.h
+++ b/drivers/mtd/ubi/ubi.h
@@ -355,6 +355,7 @@ struct ubi_device {
355 } prot; 355 } prot;
356 spinlock_t wl_lock; 356 spinlock_t wl_lock;
357 struct mutex move_mutex; 357 struct mutex move_mutex;
358 struct rw_semaphore work_sem;
358 int wl_scheduled; 359 int wl_scheduled;
359 struct ubi_wl_entry **lookuptbl; 360 struct ubi_wl_entry **lookuptbl;
360 unsigned long long abs_ec; 361 unsigned long long abs_ec;