diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index b81a2317420b515887a76d638ee9dcbfc1f109c8..795219a397d336bc0ee87b6d03dfe3d1463428f3 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c @@ -800,8 +800,8 @@ void xhci_free_stream_info(struct xhci_hcd *xhci, static void xhci_init_endpoint_timer(struct xhci_hcd *xhci, struct xhci_virt_ep *ep) { - setup_timer(&ep->stop_cmd_timer, xhci_stop_endpoint_command_watchdog, - (unsigned long)ep); + timer_setup(&ep->stop_cmd_timer, xhci_stop_endpoint_command_watchdog, + 0); ep->xhci = xhci; } diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 4764121ba2b1e8cc7d0d5ecfcdca6d3223b70e72..e35eed16c84202be2b5b4699e21e4fc644510d01 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -947,15 +947,12 @@ void xhci_hc_died(struct xhci_hcd *xhci) * Instead we use a combination of that flag and checking if a new timer is * pending. */ -void xhci_stop_endpoint_command_watchdog(unsigned long arg) +void xhci_stop_endpoint_command_watchdog(struct timer_list *t) { - struct xhci_hcd *xhci; - struct xhci_virt_ep *ep; + struct xhci_virt_ep *ep = from_timer(ep, t, stop_cmd_timer); + struct xhci_hcd *xhci = ep->xhci; unsigned long flags; - ep = (struct xhci_virt_ep *) arg; - xhci = ep->xhci; - spin_lock_irqsave(&xhci->lock, flags); /* bail out if cmd completed but raced with stop ep watchdog timer.*/ diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index b966cd8783514a29dc1c2dfa3527e3a675e34327..86df906aec464adf577cba97133bd0103cb44e10 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h @@ -2076,7 +2076,7 @@ void xhci_queue_new_dequeue_state(struct xhci_hcd *xhci, struct xhci_dequeue_state *deq_state); void xhci_cleanup_stalled_ring(struct xhci_hcd *xhci, unsigned int ep_index, unsigned int stream_id, struct xhci_td *td); -void xhci_stop_endpoint_command_watchdog(unsigned long arg); +void xhci_stop_endpoint_command_watchdog(struct timer_list *t); void xhci_handle_command_timeout(struct work_struct *work); void xhci_ring_ep_doorbell(struct xhci_hcd *xhci, unsigned int slot_id,