diff options
author | Kees Cook <keescook@chromium.org> | 2017-10-17 02:44:30 +0300 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2017-11-14 13:01:39 +0300 |
commit | c9602ee7d14a72086d10b50ac68e1ea5c01e7579 (patch) | |
tree | 69c4e128d8494649875a09c135fe61d336488464 /drivers/s390/char/sclp_vt220.c | |
parent | 846d0c6f794c4bef90a021b18cedde598758507c (diff) | |
download | linux-c9602ee7d14a72086d10b50ac68e1ea5c01e7579.tar.xz |
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_vt220.c')
-rw-r--r-- | drivers/s390/char/sclp_vt220.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/s390/char/sclp_vt220.c b/drivers/s390/char/sclp_vt220.c index e84395d71389..3f9a6ef650fa 100644 --- a/drivers/s390/char/sclp_vt220.c +++ b/drivers/s390/char/sclp_vt220.c @@ -357,7 +357,7 @@ sclp_vt220_add_msg(struct sclp_vt220_request *request, * Emit buffer after having waited long enough for more data to arrive. */ static void -sclp_vt220_timeout(unsigned long data) +sclp_vt220_timeout(struct timer_list *unused) { sclp_vt220_emit_current(); } @@ -454,8 +454,6 @@ __sclp_vt220_write(const unsigned char *buf, int count, int do_schedule, /* Setup timer to output current console buffer after some time */ if (sclp_vt220_current_request != NULL && !timer_pending(&sclp_vt220_timer) && do_schedule) { - sclp_vt220_timer.function = sclp_vt220_timeout; - sclp_vt220_timer.data = 0UL; sclp_vt220_timer.expires = jiffies + BUFFER_MAX_DELAY; add_timer(&sclp_vt220_timer); } @@ -699,7 +697,7 @@ static int __init __sclp_vt220_init(int num_pages) spin_lock_init(&sclp_vt220_lock); INIT_LIST_HEAD(&sclp_vt220_empty); INIT_LIST_HEAD(&sclp_vt220_outqueue); - init_timer(&sclp_vt220_timer); + timer_setup(&sclp_vt220_timer, sclp_vt220_timeout, 0); tty_port_init(&sclp_vt220_port); sclp_vt220_current_request = NULL; sclp_vt220_buffered_chars = 0; |