Re: [PATCH 18/24] media: vb2-core: use bitops for bits

2017-10-10 Thread Sakari Ailus
On Mon, Oct 09, 2017 at 07:19:24AM -0300, Mauro Carvalho Chehab wrote:
> Use the existing macros to identify vb2_io_modes bits.
> 
> Signed-off-by: Mauro Carvalho Chehab 

Acked-by: Sakari Ailus 

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


[PATCH 18/24] media: vb2-core: use bitops for bits

2017-10-09 Thread Mauro Carvalho Chehab
Use the existing macros to identify vb2_io_modes bits.

Signed-off-by: Mauro Carvalho Chehab 
---
 include/media/videobuf2-core.h | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h
index 5f4df060affb..0308d8439049 100644
--- a/include/media/videobuf2-core.h
+++ b/include/media/videobuf2-core.h
@@ -16,6 +16,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #define VB2_MAX_FRAME  (32)
 #define VB2_MAX_PLANES (8)
@@ -191,11 +192,11 @@ struct vb2_plane {
  * @VB2_DMABUF:driver supports DMABUF with streaming API
  */
 enum vb2_io_modes {
-   VB2_MMAP= (1 << 0),
-   VB2_USERPTR = (1 << 1),
-   VB2_READ= (1 << 2),
-   VB2_WRITE   = (1 << 3),
-   VB2_DMABUF  = (1 << 4),
+   VB2_MMAP= BIT(0),
+   VB2_USERPTR = BIT(1),
+   VB2_READ= BIT(2),
+   VB2_WRITE   = BIT(3),
+   VB2_DMABUF  = BIT(4),
 };
 
 /**
-- 
2.13.6