From 4af85668588e249d98957a41030c3a2d2acc87e5 Mon Sep 17 00:00:00 2001 From: Jean-Francois Moine Date: Thu, 12 Nov 2009 15:59:27 -0300 Subject: V4L/DVB (13448): gspca - main: Add a gspca flag for inactive controls. Signed-off-by: Jean-Francois Moine Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/gspca/gspca.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/media/video/gspca/gspca.c') diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index 6915db2d36db..369eddd352c3 100644 --- a/drivers/media/video/gspca/gspca.c +++ b/drivers/media/video/gspca/gspca.c @@ -1158,10 +1158,13 @@ static int vidioc_queryctrl(struct file *file, void *priv, } } else { ctrls = get_ctrl(gspca_dev, id); + i = ctrls - gspca_dev->sd_desc->ctrls; } if (ctrls == NULL) return -EINVAL; memcpy(q_ctrl, ctrls, sizeof *q_ctrl); + if (gspca_dev->ctrl_inac & (1 << i)) + q_ctrl->flags |= V4L2_CTRL_FLAG_INACTIVE; return 0; } -- cgit v1.2.2