drivers: usb: atm: cxacru: use setup_timer() helper.
Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais <allen.lkml@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
8c0e1832e0
commit
6a29d4b944
@ -570,10 +570,8 @@ static int cxacru_start_wait_urb(struct urb *urb, struct completion *done,
|
|||||||
{
|
{
|
||||||
struct timer_list timer;
|
struct timer_list timer;
|
||||||
|
|
||||||
init_timer(&timer);
|
setup_timer(&timer, cxacru_timeout_kill, (unsigned long)urb);
|
||||||
timer.expires = jiffies + msecs_to_jiffies(CMD_TIMEOUT);
|
timer.expires = jiffies + msecs_to_jiffies(CMD_TIMEOUT);
|
||||||
timer.data = (unsigned long) urb;
|
|
||||||
timer.function = cxacru_timeout_kill;
|
|
||||||
add_timer(&timer);
|
add_timer(&timer);
|
||||||
wait_for_completion(done);
|
wait_for_completion(done);
|
||||||
del_timer_sync(&timer);
|
del_timer_sync(&timer);
|
||||||
|
Reference in New Issue
Block a user