Thread (1 message) 1 message, 1 author, 2015-05-08

[PATCH 17/18] media controller: get rid of entity subtype on Kernel

STALE4162d

From: Mauro Carvalho Chehab <hidden>
Date: 2015-05-08 01:12:50
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

Don't use anymore the type/subtype entity data/macros
inside the Kernel.

Signed-off-by: Mauro Carvalho Chehab <redacted>
diff --git a/include/media/media-entity.h b/include/media/media-entity.h
index f15b48145711..bb98506532ff 100644
--- a/include/media/media-entity.h
+++ b/include/media/media-entity.h
@@ -103,16 +103,6 @@ struct media_entity {
 	} info;
 };
 
-static inline u32 media_entity_type(struct media_entity *entity)
-{
-	return entity->type & MEDIA_ENT_TYPE_MASK;
-}
-
-static inline u32 media_entity_subtype(struct media_entity *entity)
-{
-	return entity->type & MEDIA_ENT_SUBTYPE_MASK;
-}
-
 static inline bool is_media_entity_av_dma(struct media_entity *entity)
 {
 	if (!entity)
diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h
index 663eb2c6019d..307cc4d72af0 100644
--- a/include/uapi/linux/media.h
+++ b/include/uapi/linux/media.h
@@ -71,7 +71,9 @@ struct media_device_info {
 /* Radio, Analog TV and/or Digital TV tuners */
 #define MEDIA_ENT_T_TUNER	(MEDIA_ENT_T_CAM_SENSOR + 4)
 
-#if 1
+#define MEDIA_ENT_T_DEVNODE		(1 << MEDIA_ENT_TYPE_SHIFT)
+
+#ifndef __KERNEL__
 /*
  * Legacy symbols.
  * Kept just to avoid userspace compilation breakages.
@@ -82,7 +84,6 @@ struct media_device_info {
 #define MEDIA_ENT_TYPE_MASK		0x00ff0000
 #define MEDIA_ENT_SUBTYPE_MASK		0x0000ffff
 
-#define MEDIA_ENT_T_DEVNODE		(1 << MEDIA_ENT_TYPE_SHIFT)
 #define MEDIA_ENT_T_V4L2_SUBDEV		(2 << MEDIA_ENT_TYPE_SHIFT)
 
 #define MEDIA_ENT_T_DEVNODE_FB		(MEDIA_ENT_T_DEVNODE + 2)
-- 
2.1.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