From patchwork Fri Jul 2 13:42:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 469763 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48D18C11F73 for ; Fri, 2 Jul 2021 13:43:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2BD97613CE for ; Fri, 2 Jul 2021 13:43:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232853AbhGBNqC (ORCPT ); Fri, 2 Jul 2021 09:46:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:48824 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232718AbhGBNp2 (ORCPT ); Fri, 2 Jul 2021 09:45:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8E3626142B; Fri, 2 Jul 2021 13:42:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625233376; bh=YE/LCnkMIv6fwH7bk4ME2EQ7qcy5Vj5/29RRN5K4+ok=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jb1l3cakLEMvw7JpHXk4ANbsjYL2PcNp+wG6HalxrKxauY5FEJh7faOMGSA+UHerK iN2y96J6BxeiuKatGhCcvcq/3MaXALcE/qwRWzpITOMkBWArgFIU+cEmeOmh1v8Qt3 aOGItxamv2ZdI6+4OtMHFqwEgOoMT7bXrwsy1pUN+nO3Zj2IBaYc+X9/CFV5ecYvfn dk0BqGXCRBEbaHmhQ1+K/wpz88bJzorMlUDcRV3M0rDpObxSkWEsZ36DcQug09dDtO A/u31QN7mQDjRscgUN9GLRoZgUqncNDnrWVBesLKDah648/mvpMZdXqfV8F3ZDjfzg ZpGydTmHTJi+Q== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1lzJRT-0006Q7-5j; Fri, 02 Jul 2021 15:42:51 +0200 From: Johan Hovold To: Johan Hovold Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/6] USB: serial: cp210x: clean up control-request timeout Date: Fri, 2 Jul 2021 15:42:24 +0200 Message-Id: <20210702134227.24621-4-johan@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210702134227.24621-1-johan@kernel.org> References: <20210702134227.24621-1-johan@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org For consistency use the USB_CTRL_GET_TIMEOUT define for the read-register request timeout (same value as USB_CTRL_SET_TIMEOUT). Signed-off-by: Johan Hovold --- drivers/usb/serial/cp210x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index eb3be4f65603..c7cea86c659c 100644 --- a/drivers/usb/serial/cp210x.c +++ b/drivers/usb/serial/cp210x.c @@ -637,7 +637,7 @@ static int cp210x_read_reg_block(struct usb_serial_port *port, u8 req, result = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), req, REQTYPE_INTERFACE_TO_HOST, 0, port_priv->bInterfaceNumber, dmabuf, bufsize, - USB_CTRL_SET_TIMEOUT); + USB_CTRL_GET_TIMEOUT); if (result == bufsize) { memcpy(buf, dmabuf, bufsize); result = 0;