diff options
author | Kees Cook <keescook@chromium.org> | 2017-10-18 06:10:19 +0200 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2017-11-22 00:46:44 +0100 |
commit | 87c1d2d373c2dfc9993f09c3cfd69cf2c3347b20 (patch) | |
tree | 833d43300400de30c1eb041d3faf3e19e5fd9415 /drivers/lightnvm/pblk-gc.c | |
parent | drivers/net: cris: Convert timers to use timer_setup() (diff) | |
download | linux-87c1d2d373c2dfc9993f09c3cfd69cf2c3347b20.tar.xz linux-87c1d2d373c2dfc9993f09c3cfd69cf2c3347b20.zip |
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-gc.c')
-rw-r--r-- | drivers/lightnvm/pblk-gc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/lightnvm/pblk-gc.c b/drivers/lightnvm/pblk-gc.c index 00d5698d64a9..9c8e114c8a54 100644 --- a/drivers/lightnvm/pblk-gc.c +++ b/drivers/lightnvm/pblk-gc.c @@ -442,9 +442,9 @@ next_gc_group: goto next_gc_group; } -static void pblk_gc_timer(unsigned long data) +static void pblk_gc_timer(struct timer_list *t) { - struct pblk *pblk = (struct pblk *)data; + struct pblk *pblk = from_timer(pblk, t, gc.gc_timer); pblk_gc_kick(pblk); } @@ -601,7 +601,7 @@ int pblk_gc_init(struct pblk *pblk) goto fail_free_writer_kthread; } - setup_timer(&gc->gc_timer, pblk_gc_timer, (unsigned long)pblk); + timer_setup(&gc->gc_timer, pblk_gc_timer, 0); mod_timer(&gc->gc_timer, jiffies + msecs_to_jiffies(GC_TIME_MSECS)); gc->gc_active = 0; |