summaryrefslogtreecommitdiff
path: root/net/ax25/ax25_ds_timer.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-10-24 01:45:39 -0700
committerDavid S. Miller <davem@davemloft.net>2017-10-25 12:03:56 +0900
commit8dbd05ff5c4e50a3e5b1ed4089c2d0b4210379c6 (patch)
treeadd8add0f85ad0b91d5191d0a16f0367c526a372 /net/ax25/ax25_ds_timer.c
parent9c3b57518363577d4e2ea1964ef4fa03e100beaa (diff)
downloadlwn-8dbd05ff5c4e50a3e5b1ed4089c2d0b4210379c6.tar.gz
lwn-8dbd05ff5c4e50a3e5b1ed4089c2d0b4210379c6.zip
net: ax25: 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: Joerg Reuter <jreuter@yaina.de> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: linux-hams@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/ax25/ax25_ds_timer.c')
-rw-r--r--net/ax25/ax25_ds_timer.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/net/ax25/ax25_ds_timer.c b/net/ax25/ax25_ds_timer.c
index 5fb2104b7304..e9d11313d45b 100644
--- a/net/ax25/ax25_ds_timer.c
+++ b/net/ax25/ax25_ds_timer.c
@@ -29,7 +29,7 @@
#include <linux/mm.h>
#include <linux/interrupt.h>
-static void ax25_ds_timeout(unsigned long);
+static void ax25_ds_timeout(struct timer_list *);
/*
* Add DAMA slave timeout timer to timer list.
@@ -41,8 +41,7 @@ static void ax25_ds_timeout(unsigned long);
void ax25_ds_setup_timer(ax25_dev *ax25_dev)
{
- setup_timer(&ax25_dev->dama.slave_timer, ax25_ds_timeout,
- (unsigned long)ax25_dev);
+ timer_setup(&ax25_dev->dama.slave_timer, ax25_ds_timeout, 0);
}
void ax25_ds_del_timer(ax25_dev *ax25_dev)
@@ -66,9 +65,9 @@ void ax25_ds_set_timer(ax25_dev *ax25_dev)
* Silently discard all (slave) connections in case our master forgot us...
*/
-static void ax25_ds_timeout(unsigned long arg)
+static void ax25_ds_timeout(struct timer_list *t)
{
- ax25_dev *ax25_dev = (struct ax25_dev *) arg;
+ ax25_dev *ax25_dev = from_timer(ax25_dev, t, dama.slave_timer);
ax25_cb *ax25;
if (ax25_dev == NULL || !ax25_dev->dama.slave)