提交 b0f597da 编写于 作者: A Allen Pais 提交者: Greg Kroah-Hartman

drivers: usb: hcd: use setup_timer() helper.

   Use setup_timer function instead of initializing timer with the
   function and data fields.
Signed-off-by: NAllen Pais <allen.lkml@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 e8470b52
...@@ -2558,9 +2558,7 @@ struct usb_hcd *__usb_create_hcd(const struct hc_driver *driver, ...@@ -2558,9 +2558,7 @@ struct usb_hcd *__usb_create_hcd(const struct hc_driver *driver,
hcd->self.bus_name = bus_name; hcd->self.bus_name = bus_name;
hcd->self.uses_dma = (sysdev->dma_mask != NULL); hcd->self.uses_dma = (sysdev->dma_mask != NULL);
init_timer(&hcd->rh_timer); setup_timer(&hcd->rh_timer, rh_timer_func, (unsigned long)hcd);
hcd->rh_timer.function = rh_timer_func;
hcd->rh_timer.data = (unsigned long) hcd;
#ifdef CONFIG_PM #ifdef CONFIG_PM
INIT_WORK(&hcd->wakeup_work, hcd_resume_work); INIT_WORK(&hcd->wakeup_work, hcd_resume_work);
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册