UBI: prepare debugging stuff to further debugfs conversion
We'll need the 'struct ubi_device *ubi' pointer in every debugging function (to access the ->dbg field), so add this pointer to all the functions implementing UBI debugging test modes like 'ubi_dbg_is_bitflip()' etc. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
This commit is contained in:
@@ -616,7 +616,7 @@ 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())
|
||||
if (ubi->thread_enabled && !ubi_dbg_is_bgt_disabled(ubi))
|
||||
wake_up_process(ubi->bgt_thread);
|
||||
spin_unlock(&ubi->wl_lock);
|
||||
}
|
||||
@@ -1367,7 +1367,7 @@ int ubi_thread(void *u)
|
||||
|
||||
spin_lock(&ubi->wl_lock);
|
||||
if (list_empty(&ubi->works) || ubi->ro_mode ||
|
||||
!ubi->thread_enabled || ubi_dbg_is_bgt_disabled()) {
|
||||
!ubi->thread_enabled || ubi_dbg_is_bgt_disabled(ubi)) {
|
||||
set_current_state(TASK_INTERRUPTIBLE);
|
||||
spin_unlock(&ubi->wl_lock);
|
||||
schedule();
|
||||
|
Viittaa uudesa ongelmassa
Block a user