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

index a238da9..974b778 100644 (file)
@@ -2417,9 +2417,7 @@ static int pxa25x_udc_probe(struct platform_device *pdev)
                gpio_direction_output(dev->mach->gpio_pullup, 0);
        }
 
-       init_timer(&dev->timer);
-       dev->timer.function = udc_watchdog;
-       dev->timer.data = (unsigned long) dev;
+       setup_timer(&dev->timer, udc_watchdog, (unsigned long)dev);
 
        the_controller = dev;
        platform_set_drvdata(pdev, dev);