mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 19:29:37 +00:00
s390/tape: fix timer initialization in tape_std_assign()
commit213fca9e23
upstream. commit9c6c273aa4
("timer: Remove init_timer_on_stack() in favor of timer_setup_on_stack()") changed the timer setup from init_timer_on_stack(() to timer_setup(), but missed to change the mod_timer() call. And while at it, use msecs_to_jiffies() instead of the open coded timeout calculation. Cc: stable@vger.kernel.org Fixes:9c6c273aa4
("timer: Remove init_timer_on_stack() in favor of timer_setup_on_stack()") Signed-off-by: Sven Schnelle <svens@linux.ibm.com> Reviewed-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5ef14af166
commit
8a8d007bae
1 changed files with 1 additions and 2 deletions
|
@ -53,7 +53,6 @@ int
|
|||
tape_std_assign(struct tape_device *device)
|
||||
{
|
||||
int rc;
|
||||
struct timer_list timeout;
|
||||
struct tape_request *request;
|
||||
|
||||
request = tape_alloc_request(2, 11);
|
||||
|
@ -70,7 +69,7 @@ tape_std_assign(struct tape_device *device)
|
|||
* So we set up a timeout for this call.
|
||||
*/
|
||||
timer_setup(&request->timer, tape_std_assign_timeout, 0);
|
||||
mod_timer(&timeout, jiffies + 2 * HZ);
|
||||
mod_timer(&request->timer, jiffies + msecs_to_jiffies(2000));
|
||||
|
||||
rc = tape_do_io_interruptible(device, request);
|
||||
|
||||
|
|
Loading…
Reference in a new issue