summaryrefslogtreecommitdiff
path: root/include/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2017-10-05 20:52:19 +0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-12-18 19:54:22 +0300
commit468fde0b79f3c36494eea6d3d7eb20cfb8f38a50 (patch)
tree52215ddbb47cb8fde4a7a1886cd3031760169292 /include/media
parent1ac051631a90b3062694c5ae6b85cf4d7699749d (diff)
downloadlinux-468fde0b79f3c36494eea6d3d7eb20cfb8f38a50.tar.xz
media: v4l2-dev: document VFL_DIR_* direction defines
The V4L_DIR_* direction flags document the direction for a V4L2 device node. Convert them to enum and document. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/v4l2-dev.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
index ecd79332d771..ed5b513f5161 100644
--- a/include/media/v4l2-dev.h
+++ b/include/media/v4l2-dev.h
@@ -41,11 +41,21 @@ enum vfl_devnode_type {
};
#define VFL_TYPE_MAX VFL_TYPE_TOUCH
-/* Is this a receiver, transmitter or mem-to-mem? */
-/* Ignored for VFL_TYPE_SUBDEV. */
-#define VFL_DIR_RX 0
-#define VFL_DIR_TX 1
-#define VFL_DIR_M2M 2
+/**
+ * enum vfl_direction - Identifies if a &struct video_device corresponds
+ * to a receiver, a transmitter or a mem-to-mem device.
+ *
+ * @VFL_DIR_RX: device is a receiver.
+ * @VFL_DIR_TX: device is a transmitter.
+ * @VFL_DIR_M2M: device is a memory to memory device.
+ *
+ * Note: Ignored if &enum vfl_devnode_type is %VFL_TYPE_SUBDEV.
+ */
+enum vfl_devnode_direction {
+ VFL_DIR_RX,
+ VFL_DIR_TX,
+ VFL_DIR_M2M,
+};
struct v4l2_ioctl_callbacks;
struct video_device;
@@ -250,7 +260,7 @@ struct video_device
/* device info */
char name[32];
enum vfl_devnode_type vfl_type;
- int vfl_dir;
+ enum vfl_devnode_direction vfl_dir;
int minor;
u16 num;
unsigned long flags;