Re: [PATCH 01/24] media: v4l2-dev.h: add kernel-doc to two macros

2017-10-09 Thread Sakari Ailus
Hi Mauro,

On Mon, Oct 09, 2017 at 07:19:07AM -0300, Mauro Carvalho Chehab wrote:
> There are two macros at v4l2-dev.h that aren't documented.
> 
> Document them, for completeness.
> 
> Signed-off-by: Mauro Carvalho Chehab 
> ---
>  include/media/v4l2-dev.h | 18 +++---
>  1 file changed, 15 insertions(+), 3 deletions(-)
> 
> diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
> index e657614521e3..de1a1453cfd9 100644
> --- a/include/media/v4l2-dev.h
> +++ b/include/media/v4l2-dev.h
> @@ -260,9 +260,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  video_device from
> + *   the  media_entity embedded on it.
> + *
> + * @entity: pointer to  media_entity
> + */
> +#define media_entity_to_video_device(entity) \
> + container_of(entity, struct video_device, entity)
> +
> +/**
> + * media_entity_to_video_device - Returns a  video_device from

-> to_video_device

With that,

Acked-by: Sakari Ailus 

> + *   the  device embedded on it.
> + *
> + * @cd: pointer to  device
> + */
>  #define to_video_device(cd) container_of(cd, struct video_device, dev)
>  
>  /**

-- 
Regards,

Sakari Ailus
e-mail: sakari.ai...@iki.fi


[PATCH 01/24] media: v4l2-dev.h: add kernel-doc to two macros

2017-10-09 Thread Mauro Carvalho Chehab
There are two macros at v4l2-dev.h that aren't documented.

Document them, for completeness.

Signed-off-by: Mauro Carvalho Chehab 
---
 include/media/v4l2-dev.h | 18 +++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
index e657614521e3..de1a1453cfd9 100644
--- a/include/media/v4l2-dev.h
+++ b/include/media/v4l2-dev.h
@@ -260,9 +260,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  video_device from
+ * the  media_entity embedded on it.
+ *
+ * @entity: pointer to  media_entity
+ */
+#define media_entity_to_video_device(entity) \
+   container_of(entity, struct video_device, entity)
+
+/**
+ * media_entity_to_video_device - Returns a  video_device from
+ * the  device embedded on it.
+ *
+ * @cd: pointer to  device
+ */
 #define to_video_device(cd) container_of(cd, struct video_device, dev)
 
 /**
-- 
2.13.6