Skip to content

Commit

Permalink
UBI: fix comment
Browse files Browse the repository at this point in the history
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
  • Loading branch information
Artem Bityutskiy authored and Artem Bityutskiy committed Dec 26, 2007
1 parent 593dd33 commit 16f557e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
5 changes: 2 additions & 3 deletions drivers/mtd/ubi/vtbl.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,8 @@ int ubi_change_vtbl_record(struct ubi_device *ubi, int idx,
}

/**
* vol_til_check - check if volume table is not corrupted and contains sensible
* data.
*
* vtbl_check - check if volume table is not corrupted and contains sensible
* data.
* @ubi: UBI device description object
* @vtbl: volume table
*
Expand Down
9 changes: 3 additions & 6 deletions drivers/mtd/ubi/wl.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ static int do_work(struct ubi_device *ubi)
*/
down_read(&ubi->work_sem);
spin_lock(&ubi->wl_lock);

if (list_empty(&ubi->works)) {
spin_unlock(&ubi->wl_lock);
up_read(&ubi->work_sem);
Expand All @@ -268,6 +267,8 @@ static int do_work(struct ubi_device *ubi)

wrk = list_entry(ubi->works.next, struct ubi_work, list);
list_del(&wrk->list);
ubi->works_count -= 1;
ubi_assert(ubi->works_count >= 0);
spin_unlock(&ubi->wl_lock);

/*
Expand All @@ -278,12 +279,8 @@ static int do_work(struct ubi_device *ubi)
err = wrk->func(ubi, wrk, 0);
if (err)
ubi_err("work failed with error code %d", err);

spin_lock(&ubi->wl_lock);
ubi->works_count -= 1;
ubi_assert(ubi->works_count >= 0);
spin_unlock(&ubi->wl_lock);
up_read(&ubi->work_sem);

return err;
}

Expand Down

0 comments on commit 16f557e

Please sign in to comment.