diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-02-08 00:58:18 +0100 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-04-16 23:44:56 +0200 |
commit | c0cc496bc56d4704a335f9f9931f324ad07d9d96 (patch) | |
tree | 5cb0399d36611c27fb3a35ecb47278e0c249e3a2 /isp | |
parent | 8c867710ea62e8f371246624621d2e8d84a773f6 (diff) |
controls: Make sure subdev is open before setting CCDC black level
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'isp')
-rw-r--r-- | isp/controls.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/isp/controls.c b/isp/controls.c index 421b4bf..f75402b 100644 --- a/isp/controls.c +++ b/isp/controls.c @@ -162,6 +162,8 @@ int omap3_isp_ccdc_set_black_level(struct omap3_isp_device *isp, unsigned int va struct omap3isp_ccdc_bclamp bclamp; int ret; + v4l2_subdev_open(isp->ccdc.entity); + memset(&config, 0, sizeof config); config.update = OMAP3ISP_CCDC_BLCLAMP; config.flag = 0; @@ -171,8 +173,10 @@ int omap3_isp_ccdc_set_black_level(struct omap3_isp_device *isp, unsigned int va bclamp.dcsubval = value; ret = ioctl(isp->ccdc.entity->fd, VIDIOC_OMAP3ISP_CCDC_CFG, &config); - if (ret < 0) + if (ret < 0) { + printf("%s: %s (%d)\n", __func__, strerror(errno), errno); return -errno; + } return ret; } |