Instead of abusing MEDIA_ENT_T_V4L2_SUBDEV, initialize new subdev entities as MEDIA_ENT_T_UNKNOWN. Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxx> diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c index 60da43772de9..07600daf5490 100644 --- a/drivers/media/v4l2-core/v4l2-subdev.c +++ b/drivers/media/v4l2-core/v4l2-subdev.c @@ -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); diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h index 7306aeaff807..e9e7ad268a7e 100644 --- a/include/uapi/linux/media.h +++ b/include/uapi/linux/media.h @@ -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 -- 2.4.3 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html