Commit 54ff200e authored by Kees Cook's avatar Kees Cook Committed by Greg Kroah-Hartman

tty: metag_da: 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: James Hogan <james.hogan@imgtec.com>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: linux-metag@vger.kernel.org
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Acked-by: default avatarJames Hogan <jhogan@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fd97e66c
...@@ -309,7 +309,7 @@ static int put_data(void *arg) ...@@ -309,7 +309,7 @@ static int put_data(void *arg)
/* /*
* This gets called every DA_TTY_POLL and polls the channels for data * This gets called every DA_TTY_POLL and polls the channels for data
*/ */
static void dashtty_timer(unsigned long ignored) static void dashtty_timer(struct timer_list *poll_timer)
{ {
int channel; int channel;
...@@ -323,12 +323,12 @@ static void dashtty_timer(unsigned long ignored) ...@@ -323,12 +323,12 @@ static void dashtty_timer(unsigned long ignored)
if (channel >= 0) if (channel >= 0)
fetch_data(channel); fetch_data(channel);
mod_timer(&poll_timer, jiffies + DA_TTY_POLL); mod_timer(poll_timer, jiffies + DA_TTY_POLL);
} }
static void add_poll_timer(struct timer_list *poll_timer) static void add_poll_timer(struct timer_list *poll_timer)
{ {
setup_pinned_timer(poll_timer, dashtty_timer, 0); timer_setup(poll_timer, dashtty_timer, TIMER_PINNED);
poll_timer->expires = jiffies + DA_TTY_POLL; poll_timer->expires = jiffies + DA_TTY_POLL;
/* /*
...@@ -461,7 +461,7 @@ static void dashtty_hangup(struct tty_struct *tty) ...@@ -461,7 +461,7 @@ static void dashtty_hangup(struct tty_struct *tty)
* buffers. It is used to delay the expensive writeout until the writer has * buffers. It is used to delay the expensive writeout until the writer has
* stopped writing. * stopped writing.
*/ */
static void dashtty_put_timer(unsigned long ignored) static void dashtty_put_timer(struct timer_list *unused)
{ {
if (atomic_read(&dashtty_xmit_cnt)) if (atomic_read(&dashtty_xmit_cnt))
wake_up_interruptible(&dashtty_waitqueue); wake_up_interruptible(&dashtty_waitqueue);
...@@ -603,7 +603,7 @@ static int __init dashtty_init(void) ...@@ -603,7 +603,7 @@ static int __init dashtty_init(void)
complete(&dport->xmit_empty); complete(&dport->xmit_empty);
} }
setup_timer(&put_timer, dashtty_put_timer, 0); timer_setup(&put_timer, dashtty_put_timer, 0);
init_waitqueue_head(&dashtty_waitqueue); init_waitqueue_head(&dashtty_waitqueue);
dashtty_thread = kthread_create(put_data, NULL, "ttyDA"); dashtty_thread = kthread_create(put_data, NULL, "ttyDA");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment