usb: gadget: udc: snps_udc_core: use setup_timer() helper.
authorAllen Pais <allen.lkml@gmail.com>
Fri, 22 Sep 2017 08:59:43 +0000 (14:29 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Oct 2017 07:59:30 +0000 (09:59 +0200)
   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>
drivers/usb/gadget/udc/snps_udc_core.c

index 38a165d..47df99d 100644 (file)
@@ -3207,13 +3207,9 @@ int udc_probe(struct udc *dev)
                goto finished;
 
        /* timer init */
-       init_timer(&udc_timer);
-       udc_timer.function = udc_timer_function;
-       udc_timer.data = 1;
+       setup_timer(&udc_timer, udc_timer_function, 1);
        /* timer pollstall init */
-       init_timer(&udc_pollstall_timer);
-       udc_pollstall_timer.function = udc_pollstall_timer_function;
-       udc_pollstall_timer.data = 1;
+       setup_timer(&udc_pollstall_timer, udc_pollstall_timer_function, 1);
 
        /* set SD */
        reg = readl(&dev->regs->ctl);