summaryrefslogtreecommitdiffstats
path: root/drivers/s390/char/con3215.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/con3215.c
parent846d0c6f794c4bef90a021b18cedde598758507c (diff)
downloadop-kernel-dev-c9602ee7d14a72086d10b50ac68e1ea5c01e7579.zip
op-kernel-dev-c9602ee7d14a72086d10b50ac68e1ea5c01e7579.tar.gz
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/con3215.c')
-rw-r--r--drivers/s390/char/con3215.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c
index 353f0be..8c9d412 100644
--- a/drivers/s390/char/con3215.c
+++ b/drivers/s390/char/con3215.c
@@ -282,9 +282,9 @@ static void raw3215_start_io(struct raw3215_info *raw)
/*
* Function to start a delayed output after RAW3215_TIMEOUT seconds
*/
-static void raw3215_timeout(unsigned long __data)
+static void raw3215_timeout(struct timer_list *t)
{
- struct raw3215_info *raw = (struct raw3215_info *) __data;
+ struct raw3215_info *raw = from_timer(raw, t, timer);
unsigned long flags;
spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags);
@@ -670,7 +670,7 @@ static struct raw3215_info *raw3215_alloc_info(void)
return NULL;
}
- setup_timer(&info->timer, raw3215_timeout, (unsigned long)info);
+ timer_setup(&info->timer, raw3215_timeout, 0);
init_waitqueue_head(&info->empty_wait);
tasklet_init(&info->tlet, raw3215_wakeup, (unsigned long)info);
tty_port_init(&info->port);
OpenPOWER on IntegriCloud