summaryrefslogtreecommitdiff
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorMathias Nyman <mathias.nyman@linux.intel.com>2017-01-23 14:19:54 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-25 10:57:35 +0100
commit6b02e97491c9b4ef54a3b2295f2962b2ceeb25f8 (patch)
tree860a7f9f1e502c941263c678fd371f68d9679874 /drivers/usb/host
parentf99265965b3203baf5266994578db14851fbf7fa (diff)
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>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/xhci-ring.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 2ce132b44525..8ccd24eca367 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -3815,8 +3815,7 @@ static int queue_command(struct xhci_hcd *xhci, struct xhci_command *cmd,
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);
}