From patchwork Mon Oct 25 12:16:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 12581665 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55287C433EF for ; Mon, 25 Oct 2021 12:17:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4120760EBD for ; Mon, 25 Oct 2021 12:17:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233233AbhJYMT5 (ORCPT ); Mon, 25 Oct 2021 08:19:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:56320 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233070AbhJYMTn (ORCPT ); Mon, 25 Oct 2021 08:19:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E477B6108C; Mon, 25 Oct 2021 12:17:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1635164240; bh=yeLLjKIkG2yxf3NFQJnoNHi8BdfnAnLKwOhTGVC/QpU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OwycEgIdGDVbktrnIz1VAXAi6iTQ0cmJb+s2STktxHn0zF3pZdhvVoKgIN8sYr/br +wWM2YuO/NnYh2v6154oqUMq4ZsKN5JhL1NBjLwLd+RivwFOyPDbT1dhUJa7031GLs bRuYvaYY6VdTRsyCbNFe3QRRKMtEywITulQBnp+HsWgHKy74bPTH8Kd59R+6Ps1Ep6 AcrKYQsuE9kACLLsxBmpyiuDp6nAoXtP+P9p16Low9QywVjtB+QOZDJUIFKflC0LDD bzTHPLcQt4PCCN9ZVUWXumKam3qh2aUSKWJjOFZzqGn62I2PYRxU4nSP/YtNVkKEl+ B961yX0lgIMfg== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1meyuV-0001mZ-0b; Mon, 25 Oct 2021 14:17:03 +0200 From: Johan Hovold To: Sean Young , Mauro Carvalho Chehab Cc: Mike Isely , Ezequiel Garcia , linux-media@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold , stable@vger.kernel.org Subject: [PATCH 8/8] media: stk1160: fix control-message timeouts Date: Mon, 25 Oct 2021 14:16:41 +0200 Message-Id: <20211025121641.6759-9-johan@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211025121641.6759-1-johan@kernel.org> References: <20211025121641.6759-1-johan@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org USB control-message timeouts are specified in milliseconds and should specifically not vary with CONFIG_HZ. Fixes: 9cb2173e6ea8 ("[media] media: Add stk1160 new driver (easycap replacement)") Cc: stable@vger.kernel.org # 3.7 Signed-off-by: Johan Hovold --- drivers/media/usb/stk1160/stk1160-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/stk1160/stk1160-core.c b/drivers/media/usb/stk1160/stk1160-core.c index b4f8bc5db138..4e1698f78818 100644 --- a/drivers/media/usb/stk1160/stk1160-core.c +++ b/drivers/media/usb/stk1160/stk1160-core.c @@ -65,7 +65,7 @@ int stk1160_read_reg(struct stk1160 *dev, u16 reg, u8 *value) return -ENOMEM; ret = usb_control_msg(dev->udev, pipe, 0x00, USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, - 0x00, reg, buf, sizeof(u8), HZ); + 0x00, reg, buf, sizeof(u8), 1000); if (ret < 0) { stk1160_err("read failed on reg 0x%x (%d)\n", reg, ret); @@ -85,7 +85,7 @@ int stk1160_write_reg(struct stk1160 *dev, u16 reg, u16 value) ret = usb_control_msg(dev->udev, pipe, 0x01, USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, - value, reg, NULL, 0, HZ); + value, reg, NULL, 0, 1000); if (ret < 0) { stk1160_err("write failed on reg 0x%x (%d)\n", reg, ret);