Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 09e005c4 authored by Kees Cook's avatar Kees Cook Committed by Greg Kroah-Hartman
Browse files

usb: usbip: 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: Valentina Manea <valentina.manea.m@gmail.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 32bf9fd5
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -311,9 +311,9 @@ static int transfer(struct vudc *udc,
	return sent;
	return sent;
}
}


static void v_timer(unsigned long _vudc)
static void v_timer(struct timer_list *t)
{
{
	struct vudc *udc = (struct vudc *) _vudc;
	struct vudc *udc = from_timer(udc, t, tr_timer.timer);
	struct transfer_timer *timer = &udc->tr_timer;
	struct transfer_timer *timer = &udc->tr_timer;
	struct urbp *urb_p, *tmp;
	struct urbp *urb_p, *tmp;
	unsigned long flags;
	unsigned long flags;
@@ -459,7 +459,7 @@ void v_init_timer(struct vudc *udc)
{
{
	struct transfer_timer *t = &udc->tr_timer;
	struct transfer_timer *t = &udc->tr_timer;


	setup_timer(&t->timer, v_timer, (unsigned long) udc);
	timer_setup(&t->timer, v_timer, 0);
	t->state = VUDC_TR_STOPPED;
	t->state = VUDC_TR_STOPPED;
}
}