summaryrefslogtreecommitdiffstats
path: root/include/media/v4l2-dev.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2017-09-28 15:34:54 +0200
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-12-18 16:38:39 +0100
commit69b925c5fc36d8f15377fb14a00803b017371d04 (patch)
tree5913b3330783eaff832d09c094aa774e5d05bd47 /include/media/v4l2-dev.h
parentmedia: v4l2-event.rst: improve events description (diff)
downloadlinux-69b925c5fc36d8f15377fb14a00803b017371d04.tar.xz
linux-69b925c5fc36d8f15377fb14a00803b017371d04.zip
media: v4l2-dev.h: add kernel-doc to two macros
There are two macros at v4l2-dev.h that aren't documented. Document them, for completeness. Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to '')
-rw-r--r--include/media/v4l2-dev.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
index 28a686eb7d09..82b93e91e2eb 100644
--- a/include/media/v4l2-dev.h
+++ b/include/media/v4l2-dev.h
@@ -261,9 +261,21 @@ struct video_device
struct mutex *lock;
};
-#define media_entity_to_video_device(__e) \
- container_of(__e, struct video_device, entity)
-/* dev to video-device */
+/**
+ * media_entity_to_video_device - Returns a &struct video_device from
+ * the &struct media_entity embedded on it.
+ *
+ * @entity: pointer to &struct media_entity
+ */
+#define media_entity_to_video_device(entity) \
+ container_of(entity, struct video_device, entity)
+
+/**
+ * to_video_device - Returns a &struct video_device from the
+ * &struct device embedded on it.
+ *
+ * @cd: pointer to &struct device
+ */
#define to_video_device(cd) container_of(cd, struct video_device, dev)
/**