Commit ea64f8c2204cd8b9a95072c7ef85cc9a120a2693

Authored by Hans Verkuil
Committed by Mauro Carvalho Chehab
1 parent 860553023b

V4L/DVB: videodev2.h: move definition of enum v4l2_ctrl_type to the other control types

For some reason the definition of enum v4l2_ctrl_type is far from the
place where it is actually needed. This makes it hard to work with this
header.

Move it to just before struct v4l2_queryctrl, which is the one that
actually uses it.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

Showing 1 changed file with 10 additions and 10 deletions Side-by-side Diff

include/linux/videodev2.h
... ... @@ -160,16 +160,6 @@
160 160 V4L2_BUF_TYPE_PRIVATE = 0x80,
161 161 };
162 162  
163   -enum v4l2_ctrl_type {
164   - V4L2_CTRL_TYPE_INTEGER = 1,
165   - V4L2_CTRL_TYPE_BOOLEAN = 2,
166   - V4L2_CTRL_TYPE_MENU = 3,
167   - V4L2_CTRL_TYPE_BUTTON = 4,
168   - V4L2_CTRL_TYPE_INTEGER64 = 5,
169   - V4L2_CTRL_TYPE_CTRL_CLASS = 6,
170   - V4L2_CTRL_TYPE_STRING = 7,
171   -};
172   -
173 163 enum v4l2_tuner_type {
174 164 V4L2_TUNER_RADIO = 1,
175 165 V4L2_TUNER_ANALOG_TV = 2,
... ... @@ -941,6 +931,16 @@
941 931 #define V4L2_CTRL_ID_MASK (0x0fffffff)
942 932 #define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL)
943 933 #define V4L2_CTRL_DRIVER_PRIV(id) (((id) & 0xffff) >= 0x1000)
  934 +
  935 +enum v4l2_ctrl_type {
  936 + V4L2_CTRL_TYPE_INTEGER = 1,
  937 + V4L2_CTRL_TYPE_BOOLEAN = 2,
  938 + V4L2_CTRL_TYPE_MENU = 3,
  939 + V4L2_CTRL_TYPE_BUTTON = 4,
  940 + V4L2_CTRL_TYPE_INTEGER64 = 5,
  941 + V4L2_CTRL_TYPE_CTRL_CLASS = 6,
  942 + V4L2_CTRL_TYPE_STRING = 7,
  943 +};
944 944  
945 945 /* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */
946 946 struct v4l2_queryctrl {