diff options
author | Kees Cook <keescook@chromium.org> | 2017-10-17 02:43:25 +0300 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2017-11-14 13:01:36 +0300 |
commit | 846d0c6f794c4bef90a021b18cedde598758507c (patch) | |
tree | 62fa0cb9968c1c2e9f99afef36a9f2e0fc0f8462 /drivers/s390/cio/device_fsm.c | |
parent | cb9f780aa93b752ec935e6771a251717d867e603 (diff) | |
download | linux-846d0c6f794c4bef90a021b18cedde598758507c.tar.xz |
s390/cio: 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.
Cc: Sebastian Ott <sebott@linux.vnet.ibm.com>
Cc: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/device_fsm.c')
-rw-r--r-- | drivers/s390/cio/device_fsm.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c index f98ea674c3d8..dd7d79d30edc 100644 --- a/drivers/s390/cio/device_fsm.c +++ b/drivers/s390/cio/device_fsm.c @@ -91,12 +91,12 @@ static void ccw_timeout_log(struct ccw_device *cdev) /* * Timeout function. It just triggers a DEV_EVENT_TIMEOUT. */ -static void -ccw_device_timeout(unsigned long data) +void +ccw_device_timeout(struct timer_list *t) { - struct ccw_device *cdev; + struct ccw_device_private *priv = from_timer(priv, t, timer); + struct ccw_device *cdev = priv->cdev; - cdev = (struct ccw_device *) data; spin_lock_irq(cdev->ccwlock); if (timeout_log_enabled) ccw_timeout_log(cdev); @@ -118,8 +118,6 @@ ccw_device_set_timeout(struct ccw_device *cdev, int expires) if (mod_timer(&cdev->private->timer, jiffies + expires)) return; } - cdev->private->timer.function = ccw_device_timeout; - cdev->private->timer.data = (unsigned long) cdev; cdev->private->timer.expires = jiffies + expires; add_timer(&cdev->private->timer); } |