isdn: use setup_timer
authorGeliang Tang <geliangtang@gmail.com>
Thu, 23 Mar 2017 13:15:57 +0000 (21:15 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 24 Mar 2017 19:33:42 +0000 (12:33 -0700)
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>
30 files changed:
drivers/isdn/divert/isdn_divert.c
drivers/isdn/hardware/eicon/divasi.c
drivers/isdn/hardware/mISDN/hfcmulti.c
drivers/isdn/hardware/mISDN/hfcpci.c
drivers/isdn/hardware/mISDN/mISDNipac.c
drivers/isdn/hardware/mISDN/mISDNisar.c
drivers/isdn/hardware/mISDN/w6692.c
drivers/isdn/hisax/amd7930_fn.c
drivers/isdn/hisax/arcofi.c
drivers/isdn/hisax/diva.c
drivers/isdn/hisax/elsa.c
drivers/isdn/hisax/fsm.c
drivers/isdn/hisax/hfc4s8s_l1.c
drivers/isdn/hisax/hfc_2bds0.c
drivers/isdn/hisax/hfc_pci.c
drivers/isdn/hisax/hfc_sx.c
drivers/isdn/hisax/hfc_usb.c
drivers/isdn/hisax/hfcscard.c
drivers/isdn/hisax/icc.c
drivers/isdn/hisax/ipacx.c
drivers/isdn/hisax/isac.c
drivers/isdn/hisax/isar.c
drivers/isdn/hisax/isdnl3.c
drivers/isdn/hisax/teleint.c
drivers/isdn/hisax/w6692.c
drivers/isdn/i4l/isdn_ppp.c
drivers/isdn/i4l/isdn_tty.c
drivers/isdn/mISDN/dsp_core.c
drivers/isdn/mISDN/fsm.c
drivers/isdn/mISDN/l1oip_core.c

index 50749a70c5cacb99ee2dfbb0a1957b6baf336247..060d357f107f8c7720b08e6791dc352893c08fff 100644 (file)
@@ -157,10 +157,8 @@ int cf_command(int drvid, int mode,
        /* allocate mem for information struct */
        if (!(cs = kmalloc(sizeof(struct call_struc), GFP_ATOMIC)))
                return (-ENOMEM); /* no memory */
-       init_timer(&cs->timer);
+       setup_timer(&cs->timer, deflect_timer_expire, (ulong)cs);
        cs->info[0] = '\0';
-       cs->timer.function = deflect_timer_expire;
-       cs->timer.data = (ulong) cs; /* pointer to own structure */
        cs->ics.driver = drvid;
        cs->ics.command = ISDN_CMD_PROT_IO; /* protocol specific io */
        cs->ics.arg = DSS1_CMD_INVOKE; /* invoke supplementary service */
@@ -452,10 +450,9 @@ static int isdn_divert_icall(isdn_ctrl *ic)
                                        return (0); /* no external deflection needed */
                        if (!(cs = kmalloc(sizeof(struct call_struc), GFP_ATOMIC)))
                                return (0); /* no memory */
-                       init_timer(&cs->timer);
+                       setup_timer(&cs->timer, deflect_timer_expire,
+                                   (ulong)cs);
                        cs->info[0] = '\0';
-                       cs->timer.function = deflect_timer_expire;
-                       cs->timer.data = (ulong) cs; /* pointer to own structure */
 
                        cs->ics = *ic; /* copy incoming data */
                        if (!cs->ics.parm.setup.phone[0]) strcpy(cs->ics.parm.setup.phone, "0");
index cb88090f9cea3036af14b8e8bcaa9eaeb4d58434..c61049585cbd7b67f24e057238244b8938500a9e 100644 (file)
@@ -300,9 +300,8 @@ static int um_idi_open_adapter(struct file *file, int adapter_nr)
        p_os = (diva_um_idi_os_context_t *) diva_um_id_get_os_context(e);
        init_waitqueue_head(&p_os->read_wait);
        init_waitqueue_head(&p_os->close_wait);
-       init_timer(&p_os->diva_timer_id);
-       p_os->diva_timer_id.function = (void *) diva_um_timer_function;
-       p_os->diva_timer_id.data = (unsigned long) p_os;
+       setup_timer(&p_os->diva_timer_id, (void *)diva_um_timer_function,
+                   (unsigned long)p_os);
        p_os->aborted = 0;
        p_os->adapter_nr = adapter_nr;
        return (1);
index 480c2d7794ebdcfbcb38667a0807a156a1b2fac3..961c07ee47b7337005a2997b557b0539aebff2fa 100644 (file)
@@ -3878,9 +3878,8 @@ hfcmulti_initmode(struct dchannel *dch)
                if (hc->dnum[pt]) {
                        mode_hfcmulti(hc, dch->slot, dch->dev.D.protocol,
                                      -1, 0, -1, 0);
-                       dch->timer.function = (void *) hfcmulti_dbusy_timer;
-                       dch->timer.data = (long) dch;
-                       init_timer(&dch->timer);
+                       setup_timer(&dch->timer, (void *)hfcmulti_dbusy_timer,
+                                   (long)dch);
                }
                for (i = 1; i <= 31; i++) {
                        if (!((1 << i) & hc->bmask[pt])) /* skip unused chan */
@@ -3986,9 +3985,8 @@ hfcmulti_initmode(struct dchannel *dch)
                hc->chan[i].slot_rx = -1;
                hc->chan[i].conf = -1;
                mode_hfcmulti(hc, i, dch->dev.D.protocol, -1, 0, -1, 0);
-               dch->timer.function = (void *) hfcmulti_dbusy_timer;
-               dch->timer.data = (long) dch;
-               init_timer(&dch->timer);
+               setup_timer(&dch->timer, (void *)hfcmulti_dbusy_timer,
+                           (long)dch);
                hc->chan[i - 2].slot_tx = -1;
                hc->chan[i - 2].slot_rx = -1;
                hc->chan[i - 2].conf = -1;
index ff48da61c94c849bf06cbb9ab9cb149515dcd626..5dc246d71c167d5a69f449603cbd4a329a85fa9c 100644 (file)
@@ -1717,9 +1717,8 @@ static void
 inithfcpci(struct hfc_pci *hc)
 {
        printk(KERN_DEBUG "inithfcpci: entered\n");
-       hc->dch.timer.function = (void *) hfcpci_dbusy_timer;
-       hc->dch.timer.data = (long) &hc->dch;
-       init_timer(&hc->dch.timer);
+       setup_timer(&hc->dch.timer, (void *)hfcpci_dbusy_timer,
+                   (long)&hc->dch);
        hc->chanlimit = 2;
        mode_hfcpci(&hc->bch[0], 1, -1);
        mode_hfcpci(&hc->bch[1], 2, -1);
@@ -2044,9 +2043,7 @@ setup_hw(struct hfc_pci *hc)
        Write_hfc(hc, HFCPCI_INT_M1, hc->hw.int_m1);
        /* At this point the needed PCI config is done */
        /* fifos are still not enabled */
-       hc->hw.timer.function = (void *) hfcpci_Timer;
-       hc->hw.timer.data = (long) hc;
-       init_timer(&hc->hw.timer);
+       setup_timer(&hc->hw.timer, (void *)hfcpci_Timer, (long)hc);
        /* default PCM master */
        test_and_set_bit(HFC_CFG_MASTER, &hc->cfg);
        return 0;
index 77dec28ba874c7f220944afc07e6ebcb67fa00a0..6742b0dc082115df347955c77c619e5a47ffb2d6 100644 (file)
@@ -796,9 +796,8 @@ isac_init(struct isac_hw *isac)
        }
        isac->mon_tx = NULL;
        isac->mon_rx = NULL;
-       isac->dch.timer.function = (void *) dbusy_timer_handler;
-       isac->dch.timer.data = (long)isac;
-       init_timer(&isac->dch.timer);
+       setup_timer(&isac->dch.timer, (void *)dbusy_timer_handler,
+                   (long)isac);
        isac->mocr = 0xaa;
        if (isac->type & IPAC_TYPE_ISACX) {
                /* Disable all IRQ */
index feafa91c2ed99088c0958059e0de6c04dd832128..5b078591b6ee846455ac25642c25c8d932bde99d 100644 (file)
@@ -1635,13 +1635,11 @@ init_isar(struct isar_hw *isar)
        }
        if (isar->version != 1)
                return -EINVAL;
-       isar->ch[0].ftimer.function = &ftimer_handler;
-       isar->ch[0].ftimer.data = (long)&isar->ch[0];
-       init_timer(&isar->ch[0].ftimer);
+       setup_timer(&isar->ch[0].ftimer, &ftimer_handler,
+                   (long)&isar->ch[0]);
        test_and_set_bit(FLG_INITIALIZED, &isar->ch[0].bch.Flags);
-       isar->ch[1].ftimer.function = &ftimer_handler;
-       isar->ch[1].ftimer.data = (long)&isar->ch[1];
-       init_timer(&isar->ch[1].ftimer);
+       setup_timer(&isar->ch[1].ftimer, &ftimer_handler,
+                   (long)&isar->ch[1]);
        test_and_set_bit(FLG_INITIALIZED, &isar->ch[1].bch.Flags);
        return 0;
 }
index 3b067ea656bd9260d0172d7e2387d602d459d170..3052c836b89f70bc441520e439635a6e91dd2248 100644 (file)
@@ -852,9 +852,8 @@ static void initW6692(struct w6692_hw *card)
 {
        u8      val;
 
-       card->dch.timer.function = (void *)dbusy_timer_handler;
-       card->dch.timer.data = (u_long)&card->dch;
-       init_timer(&card->dch.timer);
+       setup_timer(&card->dch.timer, (void *)dbusy_timer_handler,
+                   (u_long)&card->dch);
        w6692_mode(&card->bc[0], ISDN_P_NONE);
        w6692_mode(&card->bc[1], ISDN_P_NONE);
        WriteW6692(card, W_D_CTL, 0x00);
index 36817e0a0b9465df6d1f9f8c4eee7cb0e5d24157..3a4c2f9e19e9adf81c4d93eb7847ed8b549745e2 100644 (file)
@@ -789,7 +789,5 @@ void Amd7930_init(struct IsdnCardState *cs)
 void setup_Amd7930(struct IsdnCardState *cs)
 {
        INIT_WORK(&cs->tqueue, Amd7930_bh);
-       cs->dbusytimer.function = (void *) dbusy_timer_handler;
-       cs->dbusytimer.data = (long) cs;
-       init_timer(&cs->dbusytimer);
+       setup_timer(&cs->dbusytimer, (void *)dbusy_timer_handler, (long)cs);
 }
index 29ec2dfbd155521022438964f24ea91ff333926d..9826bad49e2c1f60f11108661ecb610bcaf878b2 100644 (file)
@@ -125,9 +125,7 @@ clear_arcofi(struct IsdnCardState *cs) {
 
 void
 init_arcofi(struct IsdnCardState *cs) {
-       cs->dc.isac.arcofitimer.function = (void *) arcofi_timer;
-       cs->dc.isac.arcofitimer.data = (long) cs;
-       init_timer(&cs->dc.isac.arcofitimer);
+       setup_timer(&cs->dc.isac.arcofitimer, (void *)arcofi_timer, (long)cs);
        init_waitqueue_head(&cs->dc.isac.arcofi_wait);
        test_and_set_bit(HW_ARCOFI, &cs->HW_Flags);
 }
index 4fc90de68d18a46941cfd8c629dd5f6624600173..079336e593f95a2970b1b43606ee92b4b7d7ae0f 100644 (file)
@@ -976,9 +976,8 @@ static int setup_diva_common(struct IsdnCardState *cs)
                printk(KERN_INFO "Diva: IPACX Design Id: %x\n",
                       MemReadISAC_IPACX(cs, IPACX_ID) & 0x3F);
        } else { /* DIVA 2.0 */
-               cs->hw.diva.tl.function = (void *) diva_led_handler;
-               cs->hw.diva.tl.data = (long) cs;
-               init_timer(&cs->hw.diva.tl);
+               setup_timer(&cs->hw.diva.tl, (void *)diva_led_handler,
+                           (long)cs);
                cs->readisac  = &ReadISAC;
                cs->writeisac = &WriteISAC;
                cs->readisacfifo  = &ReadISACfifo;
index d8ef64da26f1fe6e0a25c5515401079ed19ff3cb..03bc5d504e2266774ab866c695a52546d72816b4 100644 (file)
@@ -1147,9 +1147,7 @@ static int setup_elsa_common(struct IsdnCard *card)
        init_arcofi(cs);
 #endif
        setup_isac(cs);
-       cs->hw.elsa.tl.function = (void *) elsa_led_handler;
-       cs->hw.elsa.tl.data = (long) cs;
-       init_timer(&cs->hw.elsa.tl);
+       setup_timer(&cs->hw.elsa.tl, (void *)elsa_led_handler, (long)cs);
        /* Teste Timer */
        if (cs->hw.elsa.timer) {
                byteout(cs->hw.elsa.trig, 0xff);
index c7a94713e9ec98fae0c36d61ffdc40cd27884d70..d63266fa8cbdb93bf37e630af6663f511292786d 100644 (file)
@@ -98,13 +98,11 @@ void
 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, "FsmInitTimer %lx", (long) ft);
 #endif
-       init_timer(&ft->tl);
+       setup_timer(&ft->tl, (void *)FsmExpireTimer, (long)ft);
 }
 
 void
index e034ed847ff32ca1fcf0a55e66eebe2171e3d32f..90f051ce02590f3e70ee2e1227d7aa507441a24c 100644 (file)
@@ -1396,9 +1396,8 @@ setup_instance(hfc4s8s_hw *hw)
                l1p = hw->l1 + i;
                spin_lock_init(&l1p->lock);
                l1p->hw = hw;
-               l1p->l1_timer.function = (void *) hfc_l1_timer;
-               l1p->l1_timer.data = (long) (l1p);
-               init_timer(&l1p->l1_timer);
+               setup_timer(&l1p->l1_timer, (void *)hfc_l1_timer,
+                           (long)(l1p));
                l1p->st_num = i;
                skb_queue_head_init(&l1p->d_tx_queue);
                l1p->d_if.ifc.priv = hw->l1 + i;
index a756e5cb6871cbbee83810875bfa29ed8ca93529..ad8597a1a07efd75e1979054fdcda31ecab8b7a6 100644 (file)
@@ -1073,8 +1073,6 @@ set_cs_func(struct IsdnCardState *cs)
        cs->writeisacfifo = &dummyf;
        cs->BC_Read_Reg = &ReadReg;
        cs->BC_Write_Reg = &WriteReg;
-       cs->dbusytimer.function = (void *) hfc_dbusy_timer;
-       cs->dbusytimer.data = (long) cs;
-       init_timer(&cs->dbusytimer);
+       setup_timer(&cs->dbusytimer, (void *)hfc_dbusy_timer, (long)cs);
        INIT_WORK(&cs->tqueue, hfcd_bh);
 }
index 90449e1e91e5a27924da01df6215dfa6c326651e..f9ca35cc32b135bc2ae8d31b7f2c87c05d5cfb73 100644 (file)
@@ -1582,9 +1582,7 @@ inithfcpci(struct IsdnCardState *cs)
        cs->bcs[1].BC_SetStack = setstack_2b;
        cs->bcs[0].BC_Close = close_hfcpci;
        cs->bcs[1].BC_Close = close_hfcpci;
-       cs->dbusytimer.function = (void *) hfcpci_dbusy_timer;
-       cs->dbusytimer.data = (long) cs;
-       init_timer(&cs->dbusytimer);
+       setup_timer(&cs->dbusytimer, (void *)hfcpci_dbusy_timer, (long)cs);
        mode_hfcpci(cs->bcs, 0, 0);
        mode_hfcpci(cs->bcs + 1, 0, 1);
 }
@@ -1746,9 +1744,7 @@ setup_hfcpci(struct IsdnCard *card)
        cs->BC_Write_Reg = NULL;
        cs->irq_func = &hfcpci_interrupt;
        cs->irq_flags |= IRQF_SHARED;
-       cs->hw.hfcpci.timer.function = (void *) hfcpci_Timer;
-       cs->hw.hfcpci.timer.data = (long) cs;
-       init_timer(&cs->hw.hfcpci.timer);
+       setup_timer(&cs->hw.hfcpci.timer, (void *)hfcpci_Timer, (long)cs);
        cs->cardmsg = &hfcpci_card_msg;
        cs->auxcmd = &hfcpci_auxcmd;
 
index 13b2151c10f54ff9fd5bcec76e1ceef2b99aa472..3aef8e1a90e4455c6b1aa1e5eb935c95cd018210 100644 (file)
@@ -1495,9 +1495,7 @@ int setup_hfcsx(struct IsdnCard *card)
        } else
                return (0);     /* no valid card type */
 
-       cs->dbusytimer.function = (void *) hfcsx_dbusy_timer;
-       cs->dbusytimer.data = (long) cs;
-       init_timer(&cs->dbusytimer);
+       setup_timer(&cs->dbusytimer, (void *)hfcsx_dbusy_timer, (long)cs);
        INIT_WORK(&cs->tqueue, hfcsx_bh);
        cs->readisac = NULL;
        cs->writeisac = NULL;
@@ -1507,11 +1505,9 @@ int setup_hfcsx(struct IsdnCard *card)
        cs->BC_Write_Reg = NULL;
        cs->irq_func = &hfcsx_interrupt;
 
-       cs->hw.hfcsx.timer.function = (void *) hfcsx_Timer;
-       cs->hw.hfcsx.timer.data = (long) cs;
        cs->hw.hfcsx.b_fifo_size = 0; /* fifo size still unknown */
        cs->hw.hfcsx.cirm = ccd_sp_irqtab[cs->irq & 0xF]; /* RAM not evaluated */
-       init_timer(&cs->hw.hfcsx.timer);
+       setup_timer(&cs->hw.hfcsx.timer, (void *)hfcsx_Timer, (long)cs);
 
        reset_hfcsx(cs);
        cs->cardmsg = &hfcsx_card_msg;
index 678bd5224bc338a2767a106fb8057f544f218050..6dbd1f1da14f1e8752caadf6c9f2ca192cc63a3d 100644 (file)
@@ -1165,14 +1165,10 @@ hfc_usb_init(hfcusb_data *hfc)
        hfc->old_led_state = 0;
 
        /* init the t3 timer */
-       init_timer(&hfc->t3_timer);
-       hfc->t3_timer.data = (long) hfc;
-       hfc->t3_timer.function = (void *) l1_timer_expire_t3;
+       setup_timer(&hfc->t3_timer, (void *)l1_timer_expire_t3, (long)hfc);
 
        /* init the t4 timer */
-       init_timer(&hfc->t4_timer);
-       hfc->t4_timer.data = (long) hfc;
-       hfc->t4_timer.function = (void *) l1_timer_expire_t4;
+       setup_timer(&hfc->t4_timer, (void *)l1_timer_expire_t4, (long)hfc);
 
        /* init the background machinery for control requests */
        hfc->ctrl_read.bRequestType = 0xc0;
index 394da646e97b7316e618f054519095f83c338caa..467287096918a6661c93ab552a1759fb83fd45c8 100644 (file)
@@ -253,9 +253,7 @@ int setup_hfcs(struct IsdnCard *card)
                outb(0x57, cs->hw.hfcD.addr | 1);
        }
        set_cs_func(cs);
-       cs->hw.hfcD.timer.function = (void *) hfcs_Timer;
-       cs->hw.hfcD.timer.data = (long) cs;
-       init_timer(&cs->hw.hfcD.timer);
+       setup_timer(&cs->hw.hfcD.timer, (void *)hfcs_Timer, (long)cs);
        cs->cardmsg = &hfcs_card_msg;
        cs->irq_func = &hfcs_interrupt;
        return (1);
index 96d1df05044fb48ffceb988dd90540db9f125cdd..c7c3797a817ebecc285248985fbb4dedc50d6493 100644 (file)
@@ -676,7 +676,5 @@ clear_pending_icc_ints(struct IsdnCardState *cs)
 void setup_icc(struct IsdnCardState *cs)
 {
        INIT_WORK(&cs->tqueue, icc_bh);
-       cs->dbusytimer.function = (void *) dbusy_timer_handler;
-       cs->dbusytimer.data = (long) cs;
-       init_timer(&cs->dbusytimer);
+       setup_timer(&cs->dbusytimer, (void *)dbusy_timer_handler, (long)cs);
 }
index 9cc26b40a43771dee4d670f2416711897bc9ac1a..43effe7082ed9bba9537648eef9d950a0e172785 100644 (file)
@@ -424,9 +424,7 @@ dch_init(struct IsdnCardState *cs)
 
        cs->setstack_d      = dch_setstack;
 
-       cs->dbusytimer.function = (void *) dbusy_timer_handler;
-       cs->dbusytimer.data = (long) cs;
-       init_timer(&cs->dbusytimer);
+       setup_timer(&cs->dbusytimer, (void *)dbusy_timer_handler, (long)cs);
 
        cs->writeisac(cs, IPACX_TR_CONF0, 0x00);  // clear LDD
        cs->writeisac(cs, IPACX_TR_CONF2, 0x00);  // enable transmitter
index df7e05ca8f9c197acf94040606555fcd45a51067..4273b4548825136624a3687cae20b971fa3e0244 100644 (file)
@@ -677,7 +677,5 @@ void clear_pending_isac_ints(struct IsdnCardState *cs)
 void setup_isac(struct IsdnCardState *cs)
 {
        INIT_WORK(&cs->tqueue, isac_bh);
-       cs->dbusytimer.function = (void *) dbusy_timer_handler;
-       cs->dbusytimer.data = (long) cs;
-       init_timer(&cs->dbusytimer);
+       setup_timer(&cs->dbusytimer, (void *)dbusy_timer_handler, (long)cs);
 }
index f4956c73aa116de71a99a9ae705c81088f3fbed2..0dc60b287c4b000b94f3bb97183ad10bfc1254b9 100644 (file)
@@ -1902,10 +1902,8 @@ 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;
-       cs->bcs[0].hw.isar.ftimer.function = (void *) ftimer_handler;
-       cs->bcs[0].hw.isar.ftimer.data = (long) &cs->bcs[0];
-       init_timer(&cs->bcs[0].hw.isar.ftimer);
-       cs->bcs[1].hw.isar.ftimer.function = (void *) ftimer_handler;
-       cs->bcs[1].hw.isar.ftimer.data = (long) &cs->bcs[1];
-       init_timer(&cs->bcs[1].hw.isar.ftimer);
+       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]);
 }
index c754706f83cdc190ca18e299896590430e7b9824..569ce52c567b2beb9f42097bebe88af025d6dbed 100644 (file)
@@ -169,9 +169,7 @@ void
 L3InitTimer(struct l3_process *pc, struct L3Timer *t)
 {
        t->pc = pc;
-       t->tl.function = (void *) L3ExpireTimer;
-       t->tl.data = (long) t;
-       init_timer(&t->tl);
+       setup_timer(&t->tl, (void *)L3ExpireTimer, (long)t);
 }
 
 void
index bf647545c70c45b9bc5b0e381af27f67f17a3662..950399f066ef109cc558f09e438dc729a0843643 100644 (file)
@@ -278,9 +278,7 @@ int setup_TeleInt(struct IsdnCard *card)
        cs->bcs[0].hw.hfc.send = NULL;
        cs->bcs[1].hw.hfc.send = NULL;
        cs->hw.hfc.fifosize = 7 * 1024 + 512;
-       cs->hw.hfc.timer.function = (void *) TeleInt_Timer;
-       cs->hw.hfc.timer.data = (long) cs;
-       init_timer(&cs->hw.hfc.timer);
+       setup_timer(&cs->hw.hfc.timer, (void *)TeleInt_Timer, (long)cs);
        if (!request_region(cs->hw.hfc.addr, 2, "TeleInt isdn")) {
                printk(KERN_WARNING
                       "HiSax: TeleInt config port %x-%x already in use\n",
index a85895585d906a6367db5cce95b00f031484d05d..c99f0ec58a0189885cdfdea5ae612f73e30c5925 100644 (file)
@@ -901,9 +901,8 @@ static void initW6692(struct IsdnCardState *cs, int part)
        if (part & 1) {
                cs->setstack_d = setstack_W6692;
                cs->DC_Close = DC_Close_W6692;
-               cs->dbusytimer.function = (void *) dbusy_timer_handler;
-               cs->dbusytimer.data = (long) cs;
-               init_timer(&cs->dbusytimer);
+               setup_timer(&cs->dbusytimer, (void *)dbusy_timer_handler,
+                           (long)cs);
                resetW6692(cs);
                ph_command(cs, W_L1CMD_RST);
                cs->dc.w6692.ph_state = W_L1CMD_RST;
index 9c1e8adaf4fc825c54ff84e9c85d36a68ecb5da7..d07dd5196ffca59c11532051fb88e2ecdc7326c9 100644 (file)
@@ -2370,9 +2370,8 @@ static struct ippp_ccp_reset_state *isdn_ppp_ccp_reset_alloc_state(struct ippp_s
                rs->state = CCPResetIdle;
                rs->is = is;
                rs->id = id;
-               init_timer(&rs->timer);
-               rs->timer.data = (unsigned long)rs;
-               rs->timer.function = isdn_ppp_ccp_timer_callback;
+               setup_timer(&rs->timer, isdn_ppp_ccp_timer_callback,
+                           (unsigned long)rs);
                is->reset->rs[id] = rs;
        }
        return rs;
index 1b169559a240b0c41b9fb8c34d4837ea55d96f77..ddd8207e4e54cf617e76a2f784bc56aeff76b22e 100644 (file)
@@ -1812,9 +1812,8 @@ isdn_tty_modem_init(void)
                info->isdn_channel = -1;
                info->drv_index = -1;
                info->xmit_size = ISDN_SERIAL_XMIT_SIZE;
-               init_timer(&info->nc_timer);
-               info->nc_timer.function = isdn_tty_modem_do_ncarrier;
-               info->nc_timer.data = (unsigned long) info;
+               setup_timer(&info->nc_timer, isdn_tty_modem_do_ncarrier,
+                           (unsigned long)info);
                skb_queue_head_init(&info->xmit_queue);
 #ifdef CONFIG_ISDN_AUDIO
                skb_queue_head_init(&info->dtmf_queue);
index 9b85295aa6578f5ac5c86803e0923f29404b2e13..880e9d367a399ae6efc450a4eca70623717b8f51 100644 (file)
@@ -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;
index 26477d48bbda99cba2697e93f075703047098bab..78fc5d5e90514353b258658da350a85c408b89db 100644 (file)
@@ -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);
 
index 6ceca7db62ad42c91c10561a2e6f3330ddbefa2a..6be2041248d34832e0ee9af75d753b96c1ca8df2 100644 (file)
@@ -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;