diff options
author | Kees Cook <keescook@chromium.org> | 2017-10-06 01:13:54 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-11-15 04:11:57 +0100 |
commit | 0e0cc9df86bc56e5d55a72e0adf530d6f7fe8628 (patch) | |
tree | 3f55b57a386bf3eabb935d133c7b75b776009858 /drivers/block/aoe/aoedev.c | |
parent | amifloppy: Convert timers to use timer_setup() (diff) | |
download | linux-0e0cc9df86bc56e5d55a72e0adf530d6f7fe8628.tar.xz linux-0e0cc9df86bc56e5d55a72e0adf530d6f7fe8628.zip |
block/aoe: 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: Jens Axboe <axboe@kernel.dk>
Cc: "Ed L. Cashin" <ed.cashin@acm.org>
Cc: linux-block@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/aoe/aoedev.c')
-rw-r--r-- | drivers/block/aoe/aoedev.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/block/aoe/aoedev.c b/drivers/block/aoe/aoedev.c index b28fefb90391..697f735b07a4 100644 --- a/drivers/block/aoe/aoedev.c +++ b/drivers/block/aoe/aoedev.c @@ -15,7 +15,6 @@ #include <linux/string.h> #include "aoe.h" -static void dummy_timer(ulong); static void freetgt(struct aoedev *d, struct aoetgt *t); static void skbpoolfree(struct aoedev *d); @@ -146,11 +145,11 @@ aoedev_put(struct aoedev *d) } static void -dummy_timer(ulong vp) +dummy_timer(struct timer_list *t) { struct aoedev *d; - d = (struct aoedev *)vp; + d = from_timer(d, t, timer); if (d->flags & DEVFL_TKILL) return; d->timer.expires = jiffies + HZ; @@ -466,9 +465,7 @@ aoedev_by_aoeaddr(ulong maj, int min, int do_alloc) INIT_WORK(&d->work, aoecmd_sleepwork); spin_lock_init(&d->lock); skb_queue_head_init(&d->skbpool); - init_timer(&d->timer); - d->timer.data = (ulong) d; - d->timer.function = dummy_timer; + timer_setup(&d->timer, dummy_timer, 0); d->timer.expires = jiffies + HZ; add_timer(&d->timer); d->bufpool = NULL; /* defer to aoeblk_gdalloc */ |