Patch "media: videodev2.h: Fix struct v4l2_input tuner index comment" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    media: videodev2.h: Fix struct v4l2_input tuner index comment

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     media-videodev2.h-fix-struct-v4l2_input-tuner-index-.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit fb57ae911c10a867ad28a6a7a06a71d090d2743e
Author: Marek Vasut <marex@xxxxxxx>
Date:   Thu May 18 15:36:49 2023 +0200

    media: videodev2.h: Fix struct v4l2_input tuner index comment
    
    [ Upstream commit 26ae58f65e64fa7ba61d64bae752e59e08380c6a ]
    
    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 <marex@xxxxxxx>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 9c89429f31130..895c5ba8b6ac2 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -1588,7 +1588,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;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux