From: Hans Verkuil <hans.verkuil@xxxxxxxxx> Support the MEDIA_IOC_DEVICE_INFO ioctl for entities. Signed-off-by: Hans Verkuil <hans.verkuil@xxxxxxxxx> --- drivers/media/v4l2-core/v4l2-subdev.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c index 50ada27..ae7480b 100644 --- a/drivers/media/v4l2-core/v4l2-subdev.c +++ b/drivers/media/v4l2-core/v4l2-subdev.c @@ -201,6 +201,18 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg) break; } +#if defined(CONFIG_MEDIA_CONTROLLER) + case MEDIA_IOC_DEVICE_INFO: { + struct media_device_info *info = arg; + + if (sd->entity.parent == NULL) + return -ENOTTY; + media_device_fill_info(sd->entity.parent, info); + info->entity_id = sd->entity.id; + return 0; + } +#endif + case VIDIOC_QUERYCTRL: return v4l2_queryctrl(vfh->ctrl_handler, arg); -- 2.1.4 -- 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