summaryrefslogtreecommitdiffstats
path: root/net/can/af_can.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-10-17 02:29:06 +0200
committerDavid S. Miller <davem@davemloft.net>2017-10-18 13:39:38 +0200
commit1fccb565e8b09e54467d41111f6faf08fcc9c3c1 (patch)
tree6dd446110d87a42f12af91c6abcfa01a92895ce9 /net/can/af_can.c
parentnet: tulip: Convert timers to use timer_setup() (diff)
downloadlinux-1fccb565e8b09e54467d41111f6faf08fcc9c3c1.tar.xz
linux-1fccb565e8b09e54467d41111f6faf08fcc9c3c1.zip
net: can: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Oliver Hartkopp <socketcan@hartkopp.net> Cc: Marc Kleine-Budde <mkl@pengutronix.de> Cc: "David S. Miller" <davem@davemloft.net> Cc: linux-can@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/can/af_can.c')
-rw-r--r--net/can/af_can.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/can/af_can.c b/net/can/af_can.c
index 88edac0f3e36..1f75e11ac35a 100644
--- a/net/can/af_can.c
+++ b/net/can/af_can.c
@@ -882,8 +882,8 @@ static int can_pernet_init(struct net *net)
if (IS_ENABLED(CONFIG_PROC_FS)) {
/* the statistics are updated every second (timer triggered) */
if (stats_timer) {
- setup_timer(&net->can.can_stattimer, can_stat_update,
- (unsigned long)net);
+ timer_setup(&net->can.can_stattimer, can_stat_update,
+ 0);
mod_timer(&net->can.can_stattimer,
round_jiffies(jiffies + HZ));
}