Use setup_timer function instead of initializing timer with the
   function and data fields.

Signed-off-by: Allen Pais <allen.l...@gmail.com>
---
 drivers/block/aoe/aoedev.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/block/aoe/aoedev.c b/drivers/block/aoe/aoedev.c
index b28fefb..1461cfc 100644
--- a/drivers/block/aoe/aoedev.c
+++ b/drivers/block/aoe/aoedev.c
@@ -466,9 +466,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;
+       setup_timer(&d->timer, dummy_timer, (ulong)d);
        d->timer.expires = jiffies + HZ;
        add_timer(&d->timer);
        d->bufpool = NULL;      /* defer to aoeblk_gdalloc */
-- 
2.7.4

Reply via email to