diff options
author | Kees Cook <keescook@chromium.org> | 2017-10-16 17:29:14 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-18 12:39:39 +0100 |
commit | e313ac12eb13a9738116192848695da54c38b1ae (patch) | |
tree | 1e12d6bc246d4135105c94fd346d61943f7a6a25 /drivers/isdn/mISDN/timerdev.c | |
parent | d99356797a8f3abaa57e13c5d1f50e4392eca037 (diff) | |
download | linux-e313ac12eb13a9738116192848695da54c38b1ae.tar.bz2 |
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>
Diffstat (limited to 'drivers/isdn/mISDN/timerdev.c')
-rw-r--r-- | drivers/isdn/mISDN/timerdev.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/isdn/mISDN/timerdev.c b/drivers/isdn/mISDN/timerdev.c index b1e135fc1fb5..c50a34340f67 100644 --- a/drivers/isdn/mISDN/timerdev.c +++ b/drivers/isdn/mISDN/timerdev.c @@ -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) |