Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 27303fcf authored by Geliang Tang's avatar Geliang Tang Committed by David S. Miller
Browse files

drop_monitor: use setup_timer



Use setup_timer() instead of init_timer() to simplify the code.

Signed-off-by: default avatarGeliang Tang <geliangtang@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0329b7da
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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);
	}