[media] omap3isp: preview: Skip brightness and contrast in configuration ioctl
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Mon, 26 Mar 2012 11:54:26 +0000 (08:54 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 8 May 2012 16:52:04 +0000 (13:52 -0300)
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>
drivers/media/video/omap3isp/isppreview.c

index 6d0fb2c8c26da01e4cc8643f749fa1aa8be4ea80..cf5014f2302d110df2bc45e9a4aec2078fd6524d 100644 (file)
@@ -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;