From: Mathias Nyman Date: Mon, 23 Jan 2017 12:19:54 +0000 (+0200) Subject: xhci: remove unnecessary check for pending timer X-Git-Tag: v4.11-rc1~119^2~76 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6b02e97491c9b4ef54a3b2295f2962b2ceeb25f8;p=platform%2Fkernel%2Flinux-exynos.git 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 Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 2ce132b..8ccd24e 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); }