mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-18 01:34:14 +08:00
V4L/DVB (13448): gspca - main: Add a gspca flag for inactive controls.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
7ce5c41db3
commit
4af8566858
@ -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;
|
||||
}
|
||||
|
||||
|
@ -143,6 +143,7 @@ struct gspca_dev {
|
||||
struct cam cam; /* device information */
|
||||
const struct sd_desc *sd_desc; /* subdriver description */
|
||||
unsigned ctrl_dis; /* disabled controls (bit map) */
|
||||
unsigned ctrl_inac; /* inactive controls (bit map) */
|
||||
|
||||
#define USB_BUF_SZ 64
|
||||
__u8 *usb_buf; /* buffer for USB exchanges */
|
||||
|
Loading…
Reference in New Issue
Block a user