aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2015-01-09 09:06:30 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-01-09 13:05:47 -0500
commit9e08a03dc12a41ce695559f8c6d999aaf245b8be (patch)
treec67da13c1c531cd2d15419cad277a8b4acaa9d11 /drivers/usb/host
parentfc8abe02e5616817735e8a8de2ab37f6ce5e4f46 (diff)
xhci-mem: Use setup_timer
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: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/xhci-mem.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index 5cb3d7a10017..e72265c06f52 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -833,9 +833,8 @@ void xhci_free_stream_info(struct xhci_hcd *xhci,
833static void xhci_init_endpoint_timer(struct xhci_hcd *xhci, 833static void xhci_init_endpoint_timer(struct xhci_hcd *xhci,
834 struct xhci_virt_ep *ep) 834 struct xhci_virt_ep *ep)
835{ 835{
836 init_timer(&ep->stop_cmd_timer); 836 setup_timer(&ep->stop_cmd_timer, xhci_stop_endpoint_command_watchdog,
837 ep->stop_cmd_timer.data = (unsigned long) ep; 837 (unsigned long)ep);
838 ep->stop_cmd_timer.function = xhci_stop_endpoint_command_watchdog;
839 ep->xhci = xhci; 838 ep->xhci = xhci;
840} 839}
841 840
@@ -2509,9 +2508,8 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
2509 xhci_print_ir_set(xhci, 0); 2508 xhci_print_ir_set(xhci, 0);
2510 2509
2511 /* init command timeout timer */ 2510 /* init command timeout timer */
2512 init_timer(&xhci->cmd_timer); 2511 setup_timer(&xhci->cmd_timer, xhci_handle_command_timeout,
2513 xhci->cmd_timer.data = (unsigned long) xhci; 2512 (unsigned long)xhci);
2514 xhci->cmd_timer.function = xhci_handle_command_timeout;
2515 2513
2516 /* 2514 /*
2517 * XXX: Might need to set the Interrupter Moderation Register to 2515 * XXX: Might need to set the Interrupter Moderation Register to