mISDN: 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: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Anton Vasilyev <vasilyev@ispras.ru> Cc: Ingo Molnar <mingo@kernel.org> Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
d99356797a
commit
e313ac12eb
@@ -162,9 +162,9 @@ mISDN_poll(struct file *filep, poll_table *wait)
|
||||
}
|
||||
|
||||
static void
|
||||
dev_expire_timer(unsigned long data)
|
||||
dev_expire_timer(struct timer_list *t)
|
||||
{
|
||||
struct mISDNtimer *timer = (void *)data;
|
||||
struct mISDNtimer *timer = from_timer(timer, t, tl);
|
||||
u_long flags;
|
||||
|
||||
spin_lock_irqsave(&timer->dev->lock, flags);
|
||||
@@ -189,7 +189,7 @@ misdn_add_timer(struct mISDNtimerdev *dev, int timeout)
|
||||
if (!timer)
|
||||
return -ENOMEM;
|
||||
timer->dev = dev;
|
||||
setup_timer(&timer->tl, dev_expire_timer, (long)timer);
|
||||
timer_setup(&timer->tl, dev_expire_timer, 0);
|
||||
spin_lock_irq(&dev->lock);
|
||||
id = timer->id = dev->next_id++;
|
||||
if (dev->next_id < 0)
|
||||
|
Reference in New Issue
Block a user