summaryrefslogtreecommitdiffstats
path: root/arch/xtensa/platforms/iss/console.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-10-19 16:40:49 -0700
committerKees Cook <keescook@chromium.org>2017-11-02 15:50:33 -0700
commitd8479a21a98baf1bb50426986d15605cee96ec36 (patch)
tree63415254d6cbd1b4065a01772702d23aceea75c8 /arch/xtensa/platforms/iss/console.c
parent3142692a5e94a45a50abd78b4ae1c52f75eae41e (diff)
downloadlinux-d8479a21a98baf1bb50426986d15605cee96ec36.tar.bz2
xtensa: 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: Chris Zankel <chris@zankel.net> Cc: Max Filippov <jcmvbkbc@gmail.com> Cc: linux-xtensa@linux-xtensa.org Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'arch/xtensa/platforms/iss/console.c')
-rw-r--r--arch/xtensa/platforms/iss/console.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/xtensa/platforms/iss/console.c b/arch/xtensa/platforms/iss/console.c
index 0140a22551c8..464c2684c4f1 100644
--- a/arch/xtensa/platforms/iss/console.c
+++ b/arch/xtensa/platforms/iss/console.c
@@ -47,15 +47,14 @@ static char *serial_name = "ISS serial driver";
* initialization for the tty structure.
*/
-static void rs_poll(unsigned long);
+static void rs_poll(struct timer_list *);
static int rs_open(struct tty_struct *tty, struct file * filp)
{
tty->port = &serial_port;
spin_lock_bh(&timer_lock);
if (tty->count == 1) {
- setup_timer(&serial_timer, rs_poll,
- (unsigned long)&serial_port);
+ timer_setup(&serial_timer, rs_poll, 0);
mod_timer(&serial_timer, jiffies + SERIAL_TIMER_VALUE);
}
spin_unlock_bh(&timer_lock);
@@ -92,9 +91,9 @@ static int rs_write(struct tty_struct * tty,
return count;
}
-static void rs_poll(unsigned long priv)
+static void rs_poll(struct timer_list *unused)
{
- struct tty_port *port = (struct tty_port *)priv;
+ struct tty_port *port = &serial_port;
int i = 0;
int rd = 1;
unsigned char c;