Skip to content

Commit

Permalink
[media] omap3isp: preview: Skip brightness and contrast in configurat…
Browse files Browse the repository at this point in the history
…ion ioctl

Brightness and contrast are handled through V4L2 controls. Their
configuration bit in the preview engine update attributes table is set
to -1 to reflect that. However, the VIDIOC_OMAP3ISP_PRV_CFG ioctl
handler doesn't handle -1 correctly as a configuration bit value, and
erroneously considers that the parameter has been selected for update by
the ioctl caller. Fix this.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Laurent Pinchart authored and Mauro Carvalho Chehab committed May 8, 2012
1 parent ca7f4a3 commit 213cf90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/omap3isp/isppreview.c
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ static int preview_config(struct isp_prev_device *prev,
attr = &update_attrs[i];
bit = 0;

if (!(cfg->update & attr->cfg_bit))
if (attr->cfg_bit == -1 || !(cfg->update & attr->cfg_bit))
continue;

bit = cfg->flag & attr->cfg_bit;
Expand Down

0 comments on commit 213cf90

Please sign in to comment.