summaryrefslogtreecommitdiff
path: root/drivers/isdn/mISDN
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@gmail.com>2017-03-23 21:15:57 +0800
committerDavid S. Miller <davem@davemloft.net>2017-03-24 12:33:42 -0700
commitaff55a3638a2d13de5cf0b0c45993378282cbe91 (patch)
treef410bca6f54d51817634f5a8fa92304ac69a1b4e /drivers/isdn/mISDN
parent9096643856919eba4ea7dd462e3528bc6d230f4f (diff)
isdn: use setup_timer
Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang <geliangtang@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/mISDN')
-rw-r--r--drivers/isdn/mISDN/dsp_core.c4
-rw-r--r--drivers/isdn/mISDN/fsm.c4
-rw-r--r--drivers/isdn/mISDN/l1oip_core.c4
3 files changed, 3 insertions, 9 deletions
diff --git a/drivers/isdn/mISDN/dsp_core.c b/drivers/isdn/mISDN/dsp_core.c
index 9b85295aa657..880e9d367a39 100644
--- a/drivers/isdn/mISDN/dsp_core.c
+++ b/drivers/isdn/mISDN/dsp_core.c
@@ -1092,9 +1092,7 @@ dspcreate(struct channel_req *crq)
ndsp->pcm_bank_tx = -1;
ndsp->hfc_conf = -1; /* current conference number */
/* set tone timer */
- ndsp->tone.tl.function = (void *)dsp_tone_timeout;
- ndsp->tone.tl.data = (long) ndsp;
- init_timer(&ndsp->tone.tl);
+ setup_timer(&ndsp->tone.tl, (void *)dsp_tone_timeout, (long)ndsp);
if (dtmfthreshold < 20 || dtmfthreshold > 500)
dtmfthreshold = 200;
diff --git a/drivers/isdn/mISDN/fsm.c b/drivers/isdn/mISDN/fsm.c
index 26477d48bbda..78fc5d5e9051 100644
--- a/drivers/isdn/mISDN/fsm.c
+++ b/drivers/isdn/mISDN/fsm.c
@@ -110,13 +110,11 @@ void
mISDN_FsmInitTimer(struct FsmInst *fi, struct FsmTimer *ft)
{
ft->fi = fi;
- ft->tl.function = (void *) FsmExpireTimer;
- ft->tl.data = (long) ft;
#if FSM_TIMER_DEBUG
if (ft->fi->debug)
ft->fi->printdebug(ft->fi, "mISDN_FsmInitTimer %lx", (long) ft);
#endif
- init_timer(&ft->tl);
+ setup_timer(&ft->tl, (void *)FsmExpireTimer, (long)ft);
}
EXPORT_SYMBOL(mISDN_FsmInitTimer);
diff --git a/drivers/isdn/mISDN/l1oip_core.c b/drivers/isdn/mISDN/l1oip_core.c
index 6ceca7db62ad..6be2041248d3 100644
--- a/drivers/isdn/mISDN/l1oip_core.c
+++ b/drivers/isdn/mISDN/l1oip_core.c
@@ -1443,9 +1443,7 @@ init_card(struct l1oip *hc, int pri, int bundle)
hc->keep_tl.expires = jiffies + 2 * HZ; /* two seconds first time */
add_timer(&hc->keep_tl);
- hc->timeout_tl.function = (void *)l1oip_timeout;
- hc->timeout_tl.data = (ulong)hc;
- init_timer(&hc->timeout_tl);
+ setup_timer(&hc->timeout_tl, (void *)l1oip_timeout, (ulong)hc);
hc->timeout_on = 0; /* state that we have timer off */
return 0;