| From b3432704da4772bf53505619cd98132893d3ec5d Mon Sep 17 00:00:00 2001 |
| From: Mathias Nyman <mathias.nyman@linux.intel.com> |
| Date: Mon, 23 Jan 2017 14:19:54 +0200 |
| Subject: [PATCH 185/255] xhci: remove unnecessary check for pending timer |
| |
| Checking if the command timeout timer is pending when queueing the |
| first command to the command ring is not really useful, remove it. |
| |
| Suggested-by: Lu Baolu <baolu.lu@linux.intel.com> |
| Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> |
| Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
| (cherry picked from commit 6b02e97491c9b4ef54a3b2295f2962b2ceeb25f8) |
| Signed-off-by: Simon Horman <horms+renesas@verge.net.au> |
| --- |
| drivers/usb/host/xhci-ring.c | 3 +-- |
| 1 file changed, 1 insertion(+), 2 deletions(-) |
| |
| --- a/drivers/usb/host/xhci-ring.c |
| +++ b/drivers/usb/host/xhci-ring.c |
| @@ -3818,8 +3818,7 @@ static int queue_command(struct xhci_hcd |
| list_add_tail(&cmd->cmd_list, &xhci->cmd_list); |
| |
| /* if there are no other commands queued we start the timeout timer */ |
| - if (xhci->cmd_list.next == &cmd->cmd_list && |
| - !delayed_work_pending(&xhci->cmd_timer)) { |
| + if (xhci->cmd_list.next == &cmd->cmd_list) { |
| xhci->current_cmd = cmd; |
| xhci_mod_cmd_timer(xhci, XHCI_CMD_DEFAULT_TIMEOUT); |
| } |