diff options
author | Geliang Tang <geliangtang@gmail.com> | 2017-03-11 03:46:59 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-03-13 09:47:16 +0300 |
commit | 27303fcf5734d84c8d018b79d1db154ceaf88df8 (patch) | |
tree | 9dfa6c629da085a6c7c03cfadb0165a5c6c10327 /net/core/drop_monitor.c | |
parent | 0329b7daff75eddcf1df2eecf2cf97a91c33d0ee (diff) | |
download | linux-27303fcf5734d84c8d018b79d1db154ceaf88df8.tar.xz |
drop_monitor: use setup_timer
Use setup_timer() instead of init_timer() to simplify the code.
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/drop_monitor.c')
-rw-r--r-- | net/core/drop_monitor.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c index fb55327dcfea..70ccda233bd1 100644 --- a/net/core/drop_monitor.c +++ b/net/core/drop_monitor.c @@ -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); } |