From patchwork Thu May 18 13:36:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 683797 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D5D7DC77B7D for ; Thu, 18 May 2023 13:37:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231162AbjERNhI (ORCPT ); Thu, 18 May 2023 09:37:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230455AbjERNhH (ORCPT ); Thu, 18 May 2023 09:37:07 -0400 Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACB071A6 for ; Thu, 18 May 2023 06:37:00 -0700 (PDT) Received: from tr.lan (ip-86-49-120-218.bb.vodafone.cz [86.49.120.218]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 5613984739; Thu, 18 May 2023 15:36:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1684417018; bh=13hzaE4MXX2E3Cr4nd2iVxAH5/Qiu91ubUeg58YqZdo=; h=From:To:Cc:Subject:Date:From; b=oL9nqR11kwhUqdqjjVqbb29BPLIvqg7pJQ1zXE98wNBxYiKotwu7abIQjjbhqAXx6 kiNwNtP3V6uk7gkmB6FsI+vZCR1YsvVJ8zNPQh12ytRAsOhbJ4WmvlzCSK45Q61Cg0 y6RJZy0ugIvZ9Q4EZqUV4w7cIgLKTmAoHo5n62wahpiSEujTMX5ji88EZG73/yXTeL mOAgLkKIHR9lkRI2dTrQ8QDfVsLxt33Byd342DNDu5x8AE+n82GCVyBkHCCNuE+cTD Vc0yYLZvvbmcy0zsYTMUVD0ezNq9w50c0HzfEN+TrF4bAgK7+Ez3G2/mMrOHTxdjo1 wmNSPmYwjSWNA== From: Marek Vasut To: linux-media@vger.kernel.org Cc: Marek Vasut , "Dmitry V . Levin" , Mauro Carvalho Chehab , Sakari Ailus Subject: [PATCH] media: videodev2.h: Fix struct v4l2_input tuner index comment Date: Thu, 18 May 2023 15:36:49 +0200 Message-Id: <20230518133649.6913-1-marex@denx.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org VIDIOC_ENUMINPUT documentation describes the tuner field of struct v4l2_input as index: Documentation/userspace-api/media/v4l/vidioc-enuminput.rst " * - __u32 - ``tuner`` - Capture devices can have zero or more tuners (RF demodulators). When the ``type`` is set to ``V4L2_INPUT_TYPE_TUNER`` this is an RF connector and this field identifies the tuner. It corresponds to struct :c:type:`v4l2_tuner` field ``index``. For details on tuners see :ref:`tuner`. " Drivers I could find also use the 'tuner' field as an index, e.g.: drivers/media/pci/bt8xx/bttv-driver.c bttv_enum_input() drivers/media/usb/go7007/go7007-v4l2.c vidioc_enum_input() However, the UAPI comment claims this field is 'enum v4l2_tuner_type': include/uapi/linux/videodev2.h This field being 'enum v4l2_tuner_type' is unlikely as it seems to be never used that way in drivers, and documentation confirms it. It seem this comment got in accidentally in the commit which this patch fixes. Fix the UAPI comment to stop confusion. This was pointed out by Dmitry while reviewing VIDIOC_ENUMINPUT support for strace. Fixes: 6016af82eafc ("[media] v4l2: use __u32 rather than enums in ioctl() structs") Signed-off-by: Marek Vasut --- Cc: Dmitry V. Levin Cc: Mauro Carvalho Chehab Cc: Sakari Ailus Cc: linux-media@vger.kernel.org --- include/uapi/linux/videodev2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index aee75eb9e6863..192afa88539a8 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -1720,7 +1720,7 @@ struct v4l2_input { __u8 name[32]; /* Label */ __u32 type; /* Type of input */ __u32 audioset; /* Associated audios (bitfield) */ - __u32 tuner; /* enum v4l2_tuner_type */ + __u32 tuner; /* Tuner index */ v4l2_std_id std; __u32 status; __u32 capabilities;