From patchwork Mon Jul 5 08:20:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 470705 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=-20.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=ham 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 5AB04C07E9A for ; Mon, 5 Jul 2021 08:20:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3E2F4613D1 for ; Mon, 5 Jul 2021 08:20:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230379AbhGEIX0 (ORCPT ); Mon, 5 Jul 2021 04:23:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:40940 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230333AbhGEIXU (ORCPT ); Mon, 5 Jul 2021 04:23:20 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E009B6141C; Mon, 5 Jul 2021 08:20:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625473240; bh=s65G1mh9EOwBbfyl45BNCxFhJTfkQYqTSqxwr7Uqpio=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NTlgWc39cXODirNmd2mHbb849K4kdnGt/MQwDXdQnqpbWhBnQMU+9YrN7r+FMfoX0 /luC4Nivp/vuALhOVKLFsykd49TzeoCGRLIsgX48ZSSy9/kSd/iO7qTRpuMQCF3Qqu 4FWXhdU3H5ZJaKtc7krezSJTV1x+o3fieyGNdDlLs5zuzNKHfhr9hRCX/x2061WLpV QIigUbTXEtuyupx17OECDVmljEUlCsRq2wn5TZJhYY8C0UiqWeOjsSCm92qVFL2JNe VpOq7cXkJ2BHFU5QGn0N06FkBO8d6PoedvFhg45R5q5Qm+GmQAuVOcNKdkFvP2q185 2/ngEGROpL9Lw== Received: from johan by xi with local (Exim 4.94.2) (envelope-from ) id 1m0JqF-0004lu-9r; Mon, 05 Jul 2021 10:20:35 +0200 From: Johan Hovold To: Johan Hovold Cc: Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/6] USB: serial: cp210x: clean up control-request timeout Date: Mon, 5 Jul 2021 10:20:12 +0200 Message-Id: <20210705082015.18286-4-johan@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210705082015.18286-1-johan@kernel.org> References: <20210705082015.18286-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 fd6bd574e2a5..e560608afb1e 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;