diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c index 4f8388423edc..83525ac29328 100644 --- a/drivers/media/media-device.c +++ b/drivers/media/media-device.c @@ -263,6 +263,7 @@ static long __media_device_get_topology(struct media_device *mdev, /* Copy fields to userspace struct if not error */ memset(&uentity, 0, sizeof(uentity)); uentity.id = entity->graph_obj.id; + uentity.function = entity->function; strncpy(uentity.name, entity->name, sizeof(uentity.name)); diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h index f9520225a211..290dd5585dc8 100644 --- a/include/uapi/linux/media.h +++ b/include/uapi/linux/media.h @@ -276,7 +276,8 @@ struct media_links_enum { struct media_v2_entity { __u32 id; char name[64]; /* FIXME: move to a property? (RFC says so) */ - __u16 reserved[14]; + __u32 function; /* Main function of the entity */ + __u16 reserved[12]; }; /* Should match the specific fields at media_intf_devnode */