diff options
author | 2017-10-16 16:44:30 -0700 | |
---|---|---|
committer | 2017-11-14 11:01:39 +0100 | |
commit | c9602ee7d14a72086d10b50ac68e1ea5c01e7579 (patch) | |
tree | 69c4e128d8494649875a09c135fe61d336488464 /drivers/s390/char/tty3270.c | |
parent | s390/cio: Convert timers to use timer_setup() (diff) | |
download | linux-c9602ee7d14a72086d10b50ac68e1ea5c01e7579.tar.gz linux-c9602ee7d14a72086d10b50ac68e1ea5c01e7579.tar.bz2 linux-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/tty3270.c')
-rw-r--r-- | drivers/s390/char/tty3270.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/s390/char/tty3270.c b/drivers/s390/char/tty3270.c index e5ebe2fbee23..e417ccd9e299 100644 --- a/drivers/s390/char/tty3270.c +++ b/drivers/s390/char/tty3270.c @@ -118,7 +118,7 @@ struct tty3270 { #define TTY_UPDATE_STATUS 8 /* Update status line. */ #define TTY_UPDATE_ALL 16 /* Recreate screen. */ -static void tty3270_update(struct tty3270 *); +static void tty3270_update(struct timer_list *); static void tty3270_resize_work(struct work_struct *work); /* @@ -361,8 +361,9 @@ tty3270_write_callback(struct raw3270_request *rq, void *data) * Update 3270 display. */ static void -tty3270_update(struct tty3270 *tp) +tty3270_update(struct timer_list *t) { + struct tty3270 *tp = from_timer(tp, t, timer); static char invalid_sba[2] = { 0xff, 0xff }; struct raw3270_request *wrq; unsigned long updated; @@ -748,8 +749,7 @@ tty3270_alloc_view(void) goto out_reset; tty_port_init(&tp->port); - setup_timer(&tp->timer, (void (*)(unsigned long)) tty3270_update, - (unsigned long) tp); + timer_setup(&tp->timer, tty3270_update, 0); tasklet_init(&tp->readlet, (void (*)(unsigned long)) tty3270_read_tasklet, (unsigned long) tp->read); |