From c9602ee7d14a72086d10b50ac68e1ea5c01e7579 Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Mon, 16 Oct 2017 16:44:30 -0700 Subject: s390/sclp: 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. Instead of creating an external static data variable, just define a separate callback which encodes the "force restart" desire. Cc: Peter Oberparleiter Cc: Greg Kroah-Hartman Signed-off-by: Kees Cook [heiko.carstens@de.ibm.com: get rid of compile warning] Signed-off-by: Martin Schwidefsky Signed-off-by: Heiko Carstens --- drivers/s390/char/sclp_con.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/s390/char/sclp_con.c') diff --git a/drivers/s390/char/sclp_con.c b/drivers/s390/char/sclp_con.c index 7027e61a6931..8966a1c1b548 100644 --- a/drivers/s390/char/sclp_con.c +++ b/drivers/s390/char/sclp_con.c @@ -125,7 +125,7 @@ static void sclp_console_sync_queue(void) * temporary write buffer without further waiting on a final new line. */ static void -sclp_console_timeout(unsigned long data) +sclp_console_timeout(struct timer_list *unused) { sclp_conbuf_emit(); } @@ -211,7 +211,6 @@ sclp_console_write(struct console *console, const char *message, /* Setup timer to output current console buffer after 1/10 second */ if (sclp_conbuf != NULL && sclp_chars_in_buffer(sclp_conbuf) != 0 && !timer_pending(&sclp_con_timer)) { - setup_timer(&sclp_con_timer, sclp_console_timeout, 0UL); mod_timer(&sclp_con_timer, jiffies + HZ / 10); } out: @@ -332,7 +331,7 @@ sclp_console_init(void) INIT_LIST_HEAD(&sclp_con_outqueue); spin_lock_init(&sclp_con_lock); sclp_conbuf = NULL; - init_timer(&sclp_con_timer); + timer_setup(&sclp_con_timer, sclp_console_timeout, 0); /* Set output format */ if (MACHINE_IS_VM) -- cgit v1.2.3-55-g7522