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>
Cette révision appartient à :

révisé par
Heiko Carstens

Parent
846d0c6f79
révision
c9602ee7d1
@@ -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);
|
||||
|
Référencer dans un nouveau ticket
Bloquer un utilisateur