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/rrpc.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 '')
-rw-r--r-- | drivers/lightnvm/rrpc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c index 267f01ae87e4..0993c14be860 100644 --- a/drivers/lightnvm/rrpc.c +++ b/drivers/lightnvm/rrpc.c @@ -267,9 +267,9 @@ static void rrpc_gc_kick(struct rrpc *rrpc) /* * timed GC every interval. */ -static void rrpc_gc_timer(unsigned long data) +static void rrpc_gc_timer(struct timer_list *t) { - struct rrpc *rrpc = (struct rrpc *)data; + struct rrpc *rrpc = from_timer(rrpc, t, gc_timer); rrpc_gc_kick(rrpc); mod_timer(&rrpc->gc_timer, jiffies + msecs_to_jiffies(10)); @@ -1063,7 +1063,7 @@ static int rrpc_gc_init(struct rrpc *rrpc) if (!rrpc->kgc_wq) return -ENOMEM; - setup_timer(&rrpc->gc_timer, rrpc_gc_timer, (unsigned long)rrpc); + timer_setup(&rrpc->gc_timer, rrpc_gc_timer, 0); return 0; } |