@@ -584,7 +584,7 @@ void v4l2_subdev_init(struct v4l2_subdev *sd, const struct v4l2_subdev_ops *ops)
sd->host_priv = NULL;
#if defined(CONFIG_MEDIA_CONTROLLER)
sd->entity.name = sd->name;
- sd->entity.type = MEDIA_ENT_T_V4L2_SUBDEV;
+ sd->entity.type = MEDIA_ENT_T_UNKNOWN;
#endif
}
EXPORT_SYMBOL(v4l2_subdev_init);
@@ -42,6 +42,14 @@ struct media_device_info {
#define MEDIA_ENT_ID_FLAG_NEXT (1 << 31)
+/* Used values for media_entity_desc::type */
+
+/*
+ * Initial value when an entity is created
+ * Drivers should change it to something useful
+ */
+#define MEDIA_ENT_T_UNKNOWN 0x00000000
+
/*
* Base numbers for entity types
*
@@ -52,7 +60,7 @@ struct media_device_info {
* However, It is kept this way just to avoid binary breakages with the
* namespace provided on legacy versions of this header.
*/
-#define MEDIA_ENT_T_DVB_BASE 0x00000000
+#define MEDIA_ENT_T_DVB_BASE 0x00000001
#define MEDIA_ENT_T_V4L2_BASE 0x00010000
#define MEDIA_ENT_T_V4L2_SUBDEV_BASE 0x00020000
Instead of abusing MEDIA_ENT_T_V4L2_SUBDEV, initialize new subdev entities as MEDIA_ENT_T_UNKNOWN. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>