Commit 064a387a authored by Julia Lawall's avatar Julia Lawall Committed by Kamal Mostafa

xhci-mem: Use setup_timer

commit 9e08a03d upstream.

Convert a call to init_timer and accompanying intializations of
the timer's data and function fields to a call to setup_timer.

A simplified version of the semantic match that fixes this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression t,f,d;
@@

-init_timer(&t);
+setup_timer(&t,f,d);
-t.data = d;
-t.function = f;
// </smpl>
Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
[ kamal: 3.19-stable prereq for "cc8e4fc0 xhci: init command timeout timer
  earlier to avoid deleting it uninitialized" ]
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
parent 273be7b4
...@@ -833,9 +833,8 @@ void xhci_free_stream_info(struct xhci_hcd *xhci, ...@@ -833,9 +833,8 @@ void xhci_free_stream_info(struct xhci_hcd *xhci,
static void xhci_init_endpoint_timer(struct xhci_hcd *xhci, static void xhci_init_endpoint_timer(struct xhci_hcd *xhci,
struct xhci_virt_ep *ep) struct xhci_virt_ep *ep)
{ {
init_timer(&ep->stop_cmd_timer); setup_timer(&ep->stop_cmd_timer, xhci_stop_endpoint_command_watchdog,
ep->stop_cmd_timer.data = (unsigned long) ep; (unsigned long)ep);
ep->stop_cmd_timer.function = xhci_stop_endpoint_command_watchdog;
ep->xhci = xhci; ep->xhci = xhci;
} }
...@@ -2510,9 +2509,8 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags) ...@@ -2510,9 +2509,8 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
xhci_print_ir_set(xhci, 0); xhci_print_ir_set(xhci, 0);
/* init command timeout timer */ /* init command timeout timer */
init_timer(&xhci->cmd_timer); setup_timer(&xhci->cmd_timer, xhci_handle_command_timeout,
xhci->cmd_timer.data = (unsigned long) xhci; (unsigned long)xhci);
xhci->cmd_timer.function = xhci_handle_command_timeout;
/* /*
* XXX: Might need to set the Interrupter Moderation Register to * XXX: Might need to set the Interrupter Moderation Register to
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment