Skip to content

Commit 2b455a5

Browse files
pinchartlHans Verkuil
authored andcommitted
media: docs: uAPI: Clarify error documentation for invalid 'which' value
Invalid values for the 'which' field of structures passed to multiple subdev ioctls result in an EINVAL error being returned. The documentation of the corresponding ioctls indicates this with sentences such as the following: the ``which`` field references a non-existing format This is confusing. Clarify the documentation. Suggested-by: Hans Verkuil <[email protected]> Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
1 parent 6b45624 commit 2b455a5

File tree

4 files changed

+11
-15
lines changed

4 files changed

+11
-15
lines changed

Documentation/userspace-api/media/v4l/vidioc-subdev-g-crop.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,9 @@ EBUSY
118118
``VIDIOC_SUBDEV_S_CROP``
119119

120120
EINVAL
121-
The struct :c:type:`v4l2_subdev_crop` ``pad``
122-
references a non-existing pad, the ``which`` field references a
123-
non-existing format, or cropping is not supported on the given
124-
subdev pad.
121+
The struct :c:type:`v4l2_subdev_crop` ``pad`` references a non-existing pad,
122+
the ``which`` field has an unsupported value, or cropping is not supported
123+
on the given subdev pad.
125124

126125
EPERM
127126
The ``VIDIOC_SUBDEV_S_CROP`` ioctl has been called on a read-only subdevice

Documentation/userspace-api/media/v4l/vidioc-subdev-g-fmt.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,8 @@ EBUSY
140140
fix the problem first. Only returned by ``VIDIOC_SUBDEV_S_FMT``
141141

142142
EINVAL
143-
The struct :c:type:`v4l2_subdev_format`
144-
``pad`` references a non-existing pad, or the ``which`` field
145-
references a non-existing format.
143+
The struct :c:type:`v4l2_subdev_format` ``pad`` references a non-existing
144+
pad, or the ``which`` field has an unsupported value.
146145

147146
EPERM
148147
The ``VIDIOC_SUBDEV_S_FMT`` ioctl has been called on a read-only subdevice

Documentation/userspace-api/media/v4l/vidioc-subdev-g-frame-interval.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,9 @@ EBUSY
117117
``VIDIOC_SUBDEV_S_FRAME_INTERVAL``
118118

119119
EINVAL
120-
The struct
121-
:c:type:`v4l2_subdev_frame_interval`
122-
``pad`` references a non-existing pad, the ``which`` field references a
123-
non-existing frame interval, or the pad doesn't support frame intervals.
120+
The struct :c:type:`v4l2_subdev_frame_interval` ``pad`` references a
121+
non-existing pad, the ``which`` field has an unsupported value, or the pad
122+
doesn't support frame intervals.
124123

125124
EPERM
126125
The ``VIDIOC_SUBDEV_S_FRAME_INTERVAL`` ioctl has been called on a read-only

Documentation/userspace-api/media/v4l/vidioc-subdev-g-selection.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,9 @@ EBUSY
116116
``VIDIOC_SUBDEV_S_SELECTION``
117117

118118
EINVAL
119-
The struct :c:type:`v4l2_subdev_selection`
120-
``pad`` references a non-existing pad, the ``which`` field
121-
references a non-existing format, or the selection target is not
122-
supported on the given subdev pad.
119+
The struct :c:type:`v4l2_subdev_selection` ``pad`` references a
120+
non-existing pad, the ``which`` field has an unsupported value, or the
121+
selection target is not supported on the given subdev pad.
123122

124123
EPERM
125124
The ``VIDIOC_SUBDEV_S_SELECTION`` ioctl has been called on a read-only

0 commit comments

Comments
 (0)