From: Geliang Tang Date: Sat, 11 Mar 2017 00:46:59 +0000 (+0800) Subject: drop_monitor: use setup_timer X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=27303fcf5734d84c8d018b79d1db154ceaf88df8;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drop_monitor: use setup_timer Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: David S. Miller --- 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); }