]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
[media] media-device.h: document the last functions
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Sun, 13 Dec 2015 10:36:58 +0000 (08:36 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Mon, 11 Jan 2016 14:19:13 +0000 (12:19 -0200)
Add kernel-doc documentation for media_device_get_devres and
media_device_find_devres.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/media-device.c
include/media/media-device.h

index c12481c753a011958cecfa52f39645bc39f563ad..ca16bd3091bd6d8ceb8c6ee2ac6eedcf31bd619c 100644 (file)
@@ -689,10 +689,6 @@ static void media_device_release_devres(struct device *dev, void *res)
 {
 }
 
-/*
- * media_device_get_devres() - get media device as device resource
- *                             creates if one doesn't exist
-*/
 struct media_device *media_device_get_devres(struct device *dev)
 {
        struct media_device *mdev;
@@ -709,9 +705,6 @@ struct media_device *media_device_get_devres(struct device *dev)
 }
 EXPORT_SYMBOL_GPL(media_device_get_devres);
 
-/*
- * media_device_find_devres() - find media device as device resource
-*/
 struct media_device *media_device_find_devres(struct device *dev)
 {
        return devres_find(dev, media_device_release_devres, NULL, NULL);
index 215a0d88241d46bd4917142e8ace6dc3c960398f..ebc2f3a239eb09a6298d057ddf66185d921acf13 100644 (file)
@@ -449,7 +449,29 @@ int __must_check media_device_register_entity(struct media_device *mdev,
  * the driver if required.
  */
 void media_device_unregister_entity(struct media_entity *entity);
+
+/**
+ * media_device_get_devres() - get media device as device resource
+ *                             creates if one doesn't exist
+ *
+ * @dev: pointer to struct &device.
+ *
+ * Sometimes, the media controller &media_device needs to be shared by more
+ * than one driver. This function adds support for that, by dynamically
+ * allocating the &media_device and allowing it to be obtained from the
+ * struct &device associated with the common device where all sub-device
+ * components belong. So, for example, on an USB device with multiple
+ * interfaces, each interface may be handled by a separate per-interface
+ * drivers. While each interface have its own &device, they all share a
+ * common &device associated with the hole USB device.
+ */
 struct media_device *media_device_get_devres(struct device *dev);
+
+/**
+ * media_device_find_devres() - find media device as device resource
+ *
+ * @dev: pointer to struct &device.
+ */
 struct media_device *media_device_find_devres(struct device *dev);
 
 /* Iterate over all entities. */