diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2007-12-19 09:03:17 -0500 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2007-12-26 12:15:16 -0500 |
commit | 16f557ecbf96dd13d13788a6f62d4d97ae73b1f9 (patch) | |
tree | c4bf8b052b7d8e0fb968cf7a274da1db7dd7bf97 /drivers | |
parent | 593dd33c92c6529443d5df1350dc5cc76511232d (diff) |
UBI: fix comment
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/ubi/vtbl.c | 5 | ||||
-rw-r--r-- | drivers/mtd/ubi/wl.c | 9 |
2 files changed, 5 insertions, 9 deletions
diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c index a37dc7a213b..7a1a8a1da61 100644 --- a/drivers/mtd/ubi/vtbl.c +++ b/drivers/mtd/ubi/vtbl.c | |||
@@ -115,9 +115,8 @@ int ubi_change_vtbl_record(struct ubi_device *ubi, int idx, | |||
115 | } | 115 | } |
116 | 116 | ||
117 | /** | 117 | /** |
118 | * vol_til_check - check if volume table is not corrupted and contains sensible | 118 | * vtbl_check - check if volume table is not corrupted and contains sensible |
119 | * data. | 119 | * data. |
120 | * | ||
121 | * @ubi: UBI device description object | 120 | * @ubi: UBI device description object |
122 | * @vtbl: volume table | 121 | * @vtbl: volume table |
123 | * | 122 | * |
diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c index 8421c7a9a83..7d32f71d6f1 100644 --- a/drivers/mtd/ubi/wl.c +++ b/drivers/mtd/ubi/wl.c | |||
@@ -259,7 +259,6 @@ static int do_work(struct ubi_device *ubi) | |||
259 | */ | 259 | */ |
260 | down_read(&ubi->work_sem); | 260 | down_read(&ubi->work_sem); |
261 | spin_lock(&ubi->wl_lock); | 261 | spin_lock(&ubi->wl_lock); |
262 | |||
263 | if (list_empty(&ubi->works)) { | 262 | if (list_empty(&ubi->works)) { |
264 | spin_unlock(&ubi->wl_lock); | 263 | spin_unlock(&ubi->wl_lock); |
265 | up_read(&ubi->work_sem); | 264 | up_read(&ubi->work_sem); |
@@ -268,6 +267,8 @@ static int do_work(struct ubi_device *ubi) | |||
268 | 267 | ||
269 | wrk = list_entry(ubi->works.next, struct ubi_work, list); | 268 | wrk = list_entry(ubi->works.next, struct ubi_work, list); |
270 | list_del(&wrk->list); | 269 | list_del(&wrk->list); |
270 | ubi->works_count -= 1; | ||
271 | ubi_assert(ubi->works_count >= 0); | ||
271 | spin_unlock(&ubi->wl_lock); | 272 | spin_unlock(&ubi->wl_lock); |
272 | 273 | ||
273 | /* | 274 | /* |
@@ -278,12 +279,8 @@ static int do_work(struct ubi_device *ubi) | |||
278 | err = wrk->func(ubi, wrk, 0); | 279 | err = wrk->func(ubi, wrk, 0); |
279 | if (err) | 280 | if (err) |
280 | ubi_err("work failed with error code %d", err); | 281 | ubi_err("work failed with error code %d", err); |
281 | |||
282 | spin_lock(&ubi->wl_lock); | ||
283 | ubi->works_count -= 1; | ||
284 | ubi_assert(ubi->works_count >= 0); | ||
285 | spin_unlock(&ubi->wl_lock); | ||
286 | up_read(&ubi->work_sem); | 282 | up_read(&ubi->work_sem); |
283 | |||
287 | return err; | 284 | return err; |
288 | } | 285 | } |
289 | 286 | ||