]> git.ipfire.org Git - thirdparty/linux.git/blobdiff - drivers/isdn/divert/isdn_divert.c
treewide: setup_timer() -> timer_setup()
[thirdparty/linux.git] / drivers / isdn / divert / isdn_divert.c
index 6f423bc49d0dcfa0a0bd4ef9321213dbd14de07e..5620fd2c6009dfb4e24664e17fad9ca2db3079d5 100644 (file)
@@ -55,10 +55,10 @@ DEFINE_SPINLOCK(divert_lock);
 /***************************/
 /* timer callback function */
 /***************************/
-static void deflect_timer_expire(ulong arg)
+static void deflect_timer_expire(struct timer_list *t)
 {
        unsigned long flags;
-       struct call_struc *cs = (struct call_struc *) arg;
+       struct call_struc *cs = from_timer(cs, t, timer);
 
        spin_lock_irqsave(&divert_lock, flags);
        del_timer(&cs->timer); /* delete active timer */
@@ -157,7 +157,7 @@ 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 */
-       setup_timer(&cs->timer, deflect_timer_expire, (ulong)cs);
+       timer_setup(&cs->timer, deflect_timer_expire, 0);
        cs->info[0] = '\0';
        cs->ics.driver = drvid;
        cs->ics.command = ISDN_CMD_PROT_IO; /* protocol specific io */
@@ -450,8 +450,7 @@ 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 */
-                       setup_timer(&cs->timer, deflect_timer_expire,
-                                   (ulong)cs);
+                       timer_setup(&cs->timer, deflect_timer_expire, 0);
                        cs->info[0] = '\0';
 
                        cs->ics = *ic; /* copy incoming data */