summaryrefslogtreecommitdiff
path: root/drivers/lightnvm/pblk-rl.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-10-18 07:10:19 +0300
committerKees Cook <keescook@chromium.org>2017-11-22 02:46:44 +0300
commit87c1d2d373c2dfc9993f09c3cfd69cf2c3347b20 (patch)
tree833d43300400de30c1eb041d3faf3e19e5fd9415 /drivers/lightnvm/pblk-rl.c
parentbd1a7b44768a6a926a95e80c98b6be5f461f76e0 (diff)
downloadlinux-87c1d2d373c2dfc9993f09c3cfd69cf2c3347b20.tar.xz
lightnvm: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Matias Bjorling <mb@lightnvm.io> Cc: linux-block@vger.kernel.org Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'drivers/lightnvm/pblk-rl.c')
-rw-r--r--drivers/lightnvm/pblk-rl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/lightnvm/pblk-rl.c b/drivers/lightnvm/pblk-rl.c
index abae31fd434e..dacc71922260 100644
--- a/drivers/lightnvm/pblk-rl.c
+++ b/drivers/lightnvm/pblk-rl.c
@@ -158,9 +158,9 @@ int pblk_rl_max_io(struct pblk_rl *rl)
return rl->rb_max_io;
}
-static void pblk_rl_u_timer(unsigned long data)
+static void pblk_rl_u_timer(struct timer_list *t)
{
- struct pblk_rl *rl = (struct pblk_rl *)data;
+ struct pblk_rl *rl = from_timer(rl, t, u_timer);
/* Release user I/O state. Protect from GC */
smp_store_release(&rl->rb_user_active, 0);
@@ -202,7 +202,7 @@ void pblk_rl_init(struct pblk_rl *rl, int budget)
atomic_set(&rl->rb_gc_cnt, 0);
atomic_set(&rl->rb_space, -1);
- setup_timer(&rl->u_timer, pblk_rl_u_timer, (unsigned long)rl);
+ timer_setup(&rl->u_timer, pblk_rl_u_timer, 0);
rl->rb_user_active = 0;
rl->rb_gc_active = 0;