From c9602ee7d14a72086d10b50ac68e1ea5c01e7579 Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Mon, 16 Oct 2017 16:44:30 -0700 Subject: 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 Cc: Greg Kroah-Hartman Signed-off-by: Kees Cook [heiko.carstens@de.ibm.com: get rid of compile warning] Signed-off-by: Martin Schwidefsky Signed-off-by: Heiko Carstens --- drivers/s390/char/con3215.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/s390/char/con3215.c') diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c index 353f0bebcf8c..8c9d412b6d33 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); -- cgit