diff options
author | Kees Cook <keescook@chromium.org> | 2017-10-16 16:44:30 -0700 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2017-11-14 11:01:39 +0100 |
commit | c9602ee7d14a72086d10b50ac68e1ea5c01e7579 (patch) | |
tree | 69c4e128d8494649875a09c135fe61d336488464 /drivers/s390/char/sclp_tty.c | |
parent | 846d0c6f794c4bef90a021b18cedde598758507c (diff) | |
download | linux-stable-c9602ee7d14a72086d10b50ac68e1ea5c01e7579.tar.gz linux-stable-c9602ee7d14a72086d10b50ac68e1ea5c01e7579.tar.bz2 linux-stable-c9602ee7d14a72086d10b50ac68e1ea5c01e7579.zip |
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_tty.c')
-rw-r--r-- | drivers/s390/char/sclp_tty.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/s390/char/sclp_tty.c b/drivers/s390/char/sclp_tty.c index 1cceefdc03e0..9f7b87d6d434 100644 --- a/drivers/s390/char/sclp_tty.c +++ b/drivers/s390/char/sclp_tty.c @@ -151,7 +151,7 @@ __sclp_ttybuf_emit(struct sclp_buffer *buffer) * temporary write buffer. */ static void -sclp_tty_timeout(unsigned long data) +sclp_tty_timeout(struct timer_list *unused) { unsigned long flags; struct sclp_buffer *buf; @@ -218,7 +218,6 @@ static int sclp_tty_write_string(const unsigned char *str, int count, int may_fa /* Setup timer to output current console buffer after 1/10 second */ if (sclp_ttybuf && sclp_chars_in_buffer(sclp_ttybuf) && !timer_pending(&sclp_tty_timer)) { - setup_timer(&sclp_tty_timer, sclp_tty_timeout, 0UL); mod_timer(&sclp_tty_timer, jiffies + HZ / 10); } spin_unlock_irqrestore(&sclp_tty_lock, flags); @@ -526,7 +525,7 @@ sclp_tty_init(void) } INIT_LIST_HEAD(&sclp_tty_outqueue); spin_lock_init(&sclp_tty_lock); - init_timer(&sclp_tty_timer); + timer_setup(&sclp_tty_timer, sclp_tty_timeout, 0); sclp_ttybuf = NULL; sclp_tty_buffer_count = 0; if (MACHINE_IS_VM) { |