Thread (89 messages) 89 messages, 9 authors, 2017-05-30

[RFC v3 13/21] media device: Deprecate media_device_{init,cleanup}() for drivers

From: Sakari Ailus <sakari.ailus@linux.intel.com>
Date: 2016-08-26 23:44:46
Subsystem: media controller framework, media input infrastructure (v4l/dvb), the rest · Maintainers: Sakari Ailus, Laurent Pinchart, Mauro Carvalho Chehab, Linus Torvalds

Drivers should no longer directly allocate media_device but rely on
media_device_alloc(), media_device_get() and media_device_put() instead.
Deprecate media_device_init() and media_device_cleanup().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 include/media/media-device.h | 8 ++++++++
 1 file changed, 8 insertions(+)
diff --git a/include/media/media-device.h b/include/media/media-device.h
index d29dec7..a3d8dd4 100644
--- a/include/media/media-device.h
+++ b/include/media/media-device.h
@@ -193,6 +193,10 @@ static inline __must_check int media_entity_enum_init(
  * So drivers need to first initialize the media device, register any entity
  * within the media device, create pad to pad links and then finally register
  * the media device by calling media_device_register() as a final step.
+ *
+ * Note that using this function in drivers is DEPRECATED. New drivers
+ * must use media_device_alloc() and manage references using
+ * media_device_get() and media_device_put() instead.
  */
 void media_device_init(struct media_device *mdev);
 
@@ -241,6 +245,10 @@ struct media_device *media_device_alloc(struct device *dev);
  *
  * This function that will destroy the graph_mutex that is
  * initialized in media_device_init().
+ *
+ * Note that using this function in drivers is DEPRECATED. New drivers
+ * must use media_device_alloc() and manage references using
+ * media_device_get() and media_device_put() instead.
  */
 void media_device_cleanup(struct media_device *mdev);
 
-- 
2.1.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help