]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
usb: usbip: Convert timers to use timer_setup()
authorKees Cook <keescook@chromium.org>
Tue, 24 Oct 2017 10:09:05 +0000 (03:09 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Nov 2017 15:57:23 +0000 (16:57 +0100)
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: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/usbip/vudc_transfer.c

index 4cfd475ee86532c9fb6bb793f9aeda789694e3b5..718f1595a18e244e2154aa8129c001205d0c6f24 100644 (file)
@@ -311,9 +311,9 @@ top:
        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 urbp *urb_p, *tmp;
        unsigned long flags;
@@ -459,7 +459,7 @@ void v_init_timer(struct vudc *udc)
 {
        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;
 }