summaryrefslogtreecommitdiff
path: root/drivers/s390/char/sclp_con.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-10-16 16:44:30 -0700
committerHeiko Carstens <heiko.carstens@de.ibm.com>2017-11-14 11:01:39 +0100
commitc9602ee7d14a72086d10b50ac68e1ea5c01e7579 (patch)
tree69c4e128d8494649875a09c135fe61d336488464 /drivers/s390/char/sclp_con.c
parent846d0c6f794c4bef90a021b18cedde598758507c (diff)
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 <oberpar@linux.vnet.ibm.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Kees Cook <keescook@chromium.org> [heiko.carstens@de.ibm.com: get rid of compile warning] Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'drivers/s390/char/sclp_con.c')
-rw-r--r--drivers/s390/char/sclp_con.c5
1 files changed, 2 insertions, 3 deletions
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)