diff options
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/gspca/gspca.c | 3 | ||||
-rw-r--r-- | drivers/media/video/gspca/gspca.h | 1 |
2 files changed, 4 insertions, 0 deletions
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, | |||
1158 | } | 1158 | } |
1159 | } else { | 1159 | } else { |
1160 | ctrls = get_ctrl(gspca_dev, id); | 1160 | ctrls = get_ctrl(gspca_dev, id); |
1161 | i = ctrls - gspca_dev->sd_desc->ctrls; | ||
1161 | } | 1162 | } |
1162 | if (ctrls == NULL) | 1163 | if (ctrls == NULL) |
1163 | return -EINVAL; | 1164 | return -EINVAL; |
1164 | memcpy(q_ctrl, ctrls, sizeof *q_ctrl); | 1165 | memcpy(q_ctrl, ctrls, sizeof *q_ctrl); |
1166 | if (gspca_dev->ctrl_inac & (1 << i)) | ||
1167 | q_ctrl->flags |= V4L2_CTRL_FLAG_INACTIVE; | ||
1165 | return 0; | 1168 | return 0; |
1166 | } | 1169 | } |
1167 | 1170 | ||
diff --git a/drivers/media/video/gspca/gspca.h b/drivers/media/video/gspca/gspca.h index 1d761d7cefc6..d59a684056ca 100644 --- a/drivers/media/video/gspca/gspca.h +++ b/drivers/media/video/gspca/gspca.h | |||
@@ -143,6 +143,7 @@ struct gspca_dev { | |||
143 | struct cam cam; /* device information */ | 143 | struct cam cam; /* device information */ |
144 | const struct sd_desc *sd_desc; /* subdriver description */ | 144 | const struct sd_desc *sd_desc; /* subdriver description */ |
145 | unsigned ctrl_dis; /* disabled controls (bit map) */ | 145 | unsigned ctrl_dis; /* disabled controls (bit map) */ |
146 | unsigned ctrl_inac; /* inactive controls (bit map) */ | ||
146 | 147 | ||
147 | #define USB_BUF_SZ 64 | 148 | #define USB_BUF_SZ 64 |
148 | __u8 *usb_buf; /* buffer for USB exchanges */ | 149 | __u8 *usb_buf; /* buffer for USB exchanges */ |