summaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hisax/isar.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-10-16 17:28:54 -0700
committerDavid S. Miller <davem@davemloft.net>2017-10-18 12:39:37 +0100
commit5e8b824d91b43baa3125ab941e42137ef458e72f (patch)
treebf1acaa5b682c61635ca80b3d65784bf5aedd34b /drivers/isdn/hisax/isar.c
parentd8eb7e262d0d438b23e69d836175b9cec3e4bb90 (diff)
downloadlinux-stable-5e8b824d91b43baa3125ab941e42137ef458e72f.tar.gz
linux-stable-5e8b824d91b43baa3125ab941e42137ef458e72f.tar.bz2
linux-stable-5e8b824d91b43baa3125ab941e42137ef458e72f.zip
isdn/hisax: 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: Karsten Keil <isdn@linux-pingi.de> Cc: Geliang Tang <geliangtang@gmail.com> Cc: "David S. Miller" <davem@davemloft.net> 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 'drivers/isdn/hisax/isar.c')
-rw-r--r--drivers/isdn/hisax/isar.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/isdn/hisax/isar.c b/drivers/isdn/hisax/isar.c
index 98b4b67ea337..d01ff116797b 100644
--- a/drivers/isdn/hisax/isar.c
+++ b/drivers/isdn/hisax/isar.c
@@ -1267,7 +1267,8 @@ isar_int_main(struct IsdnCardState *cs)
}
static void
-ftimer_handler(struct BCState *bcs) {
+ftimer_handler(struct timer_list *t) {
+ struct BCState *bcs = from_timer(bcs, t, hw.isar.ftimer);
if (bcs->cs->debug)
debugl1(bcs->cs, "ftimer flags %04lx",
bcs->Flag);
@@ -1902,8 +1903,6 @@ void initisar(struct IsdnCardState *cs)
cs->bcs[1].BC_SetStack = setstack_isar;
cs->bcs[0].BC_Close = close_isarstate;
cs->bcs[1].BC_Close = close_isarstate;
- setup_timer(&cs->bcs[0].hw.isar.ftimer, (void *)ftimer_handler,
- (long)&cs->bcs[0]);
- setup_timer(&cs->bcs[1].hw.isar.ftimer, (void *)ftimer_handler,
- (long)&cs->bcs[1]);
+ timer_setup(&cs->bcs[0].hw.isar.ftimer, ftimer_handler, 0);
+ timer_setup(&cs->bcs[1].hw.isar.ftimer, ftimer_handler, 0);
}