staging: lustre: use setup_timer().
authorMuhammad Falak R Wani <falakreyaz@gmail.com>
Wed, 11 May 2016 15:23:31 +0000 (20:53 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Jun 2016 05:38:19 +0000 (22:38 -0700)
Use setup_timer() for initializing the timer, instead of structure
assignments.
This is the preferred/standard way.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Acked-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lnet/lnet/net_fault.c

index 7d76f28d3a7a17b06d3ac2c7d7f2487a654d6d54..e4aceb71c4ecb838f88a672aa0c2c316b2c9fee1 100644 (file)
@@ -760,9 +760,7 @@ lnet_delay_rule_add(struct lnet_fault_attr *attr)
                wait_event(delay_dd.dd_ctl_waitq, delay_dd.dd_running);
        }
 
-       init_timer(&rule->dl_timer);
-       rule->dl_timer.function = delay_timer_cb;
-       rule->dl_timer.data = (unsigned long)rule;
+       setup_timer(&rule->dl_timer, delay_timer_cb, (unsigned long)rule);
 
        spin_lock_init(&rule->dl_lock);
        INIT_LIST_HEAD(&rule->dl_msg_list);