drivers: usb: hcd: use setup_timer() helper.
authorAllen Pais <allen.lkml@gmail.com>
Fri, 22 Sep 2017 08:59:35 +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/core/hcd.c

index 75ad6718858cad9d0c00023c4a273dd701a1d3a6..67aa3d039b9b15bd0975e6f24d0bbd6a7aab3d75 100644 (file)
@@ -2558,9 +2558,7 @@ struct usb_hcd *__usb_create_hcd(const struct hc_driver *driver,
        hcd->self.bus_name = bus_name;
        hcd->self.uses_dma = (sysdev->dma_mask != NULL);
 
-       init_timer(&hcd->rh_timer);
-       hcd->rh_timer.function = rh_timer_func;
-       hcd->rh_timer.data = (unsigned long) hcd;
+       setup_timer(&hcd->rh_timer, rh_timer_func, (unsigned long)hcd);
 #ifdef CONFIG_PM
        INIT_WORK(&hcd->wakeup_work, hcd_resume_work);
 #endif