Thread (2 messages) flat view 2 messages, 1 author, 2015-12-11
DORMANTno replies

[PATCH 1/2] media-device.h: Let clearer that entity function must be initialized

From: Mauro Carvalho Chehab <hidden>
Date: 2015-12-11 19:33:33
Also in: linux-media
Subsystem: media controller framework, media input infrastructure (v4l/dvb), the rest · Maintainers: Sakari Ailus, Laurent Pinchart, Mauro Carvalho Chehab, Linus Torvalds

Improve the documentation to let it clear that the entity function
must be initialized.

Suggested-by: Laurent Pinchart <laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
Signed-off-by: Mauro Carvalho Chehab <redacted>
---
 include/media/media-device.h | 4 ++++
 include/uapi/linux/media.h   | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/media/media-device.h b/include/media/media-device.h
index 7cfcc08a09ea..3448ad6320c4 100644
--- a/include/media/media-device.h
+++ b/include/media/media-device.h
@@ -423,6 +423,10 @@ void media_device_unregister(struct media_device *mdev);
  * %MEDIA_ENT_FL_DEFAULT indicates the default entity for a given type.
  * 	This can be used to report the default audio and video devices or the
  * 	default camera sensor.
+ *
+ * NOTE: Drivers should set the entity function before calling this function.
+ * Please notice that the values %MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN and
+ * %MEDIA_ENT_F_UNKNOWN should not be used by the drivers.
  */
 int __must_check media_device_register_entity(struct media_device *mdev,
 					      struct media_entity *entity);
diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h
index ff6a8010c520..8d8e1a3e6e1a 100644
--- a/include/uapi/linux/media.h
+++ b/include/uapi/linux/media.h
@@ -92,7 +92,7 @@ struct media_device_info {
  *
  * Subdevs are initialized with MEDIA_ENT_T_V4L2_SUBDEV_UNKNOWN,
  * in order to preserve backward compatibility.
- * Drivers should change to the proper subdev type before
+ * Drivers must change to the proper subdev type before
  * registering the entity.
  */
 
-- 
2.5.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help