Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: greybus: Use setup_timer function

This patch uses setup_timer function instead of initializing timer with the
function and data fields.

Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

sayli karnik and committed by
Greg Kroah-Hartman
82af03f7 0e21fa46

+2 -3
+2 -3
drivers/staging/greybus/loopback.c
··· 603 603 return -ENOMEM; 604 604 605 605 INIT_WORK(&op_async->work, gb_loopback_async_operation_work); 606 - init_timer(&op_async->timer); 607 606 kref_init(&op_async->kref); 608 607 609 608 operation = gb_operation_create(gb->connection, type, request_size, ··· 633 634 if (ret) 634 635 goto error; 635 636 636 - op_async->timer.function = gb_loopback_async_operation_timeout; 637 + setup_timer(&op_async->timer, gb_loopback_async_operation_timeout, 638 + (unsigned long)operation->id); 637 639 op_async->timer.expires = jiffies + gb->jiffy_timeout; 638 - op_async->timer.data = (unsigned long)operation->id; 639 640 add_timer(&op_async->timer); 640 641 641 642 goto done;