提交 27303fcf 编写于 作者: G Geliang Tang 提交者: David S. Miller

drop_monitor: use setup_timer

Use setup_timer() instead of init_timer() to simplify the code.
Signed-off-by: NGeliang Tang <geliangtang@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 0329b7da
......@@ -412,9 +412,8 @@ static int __init init_net_drop_monitor(void)
for_each_possible_cpu(cpu) {
data = &per_cpu(dm_cpu_data, cpu);
INIT_WORK(&data->dm_alert_work, send_dm_alert);
init_timer(&data->send_timer);
data->send_timer.data = (unsigned long)data;
data->send_timer.function = sched_send_work;
setup_timer(&data->send_timer, sched_send_work,
(unsigned long)data);
spin_lock_init(&data->lock);
reset_per_cpu_data(data);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册