diff options
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/mxc/capture/mt9v111.c | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/drivers/media/video/mxc/capture/mt9v111.c b/drivers/media/video/mxc/capture/mt9v111.c index 567261c7c838..3ffcdf64bd01 100644 --- a/drivers/media/video/mxc/capture/mt9v111.c +++ b/drivers/media/video/mxc/capture/mt9v111.c @@ -1112,19 +1112,6 @@ static int ioctl_s_ctrl(struct v4l2_int_device *s, struct v4l2_control *vc) return retval; } -/*! - * ioctl_init - V4L2 sensor interface handler for VIDIOC_INT_INIT - * @s: pointer to standard V4L2 device structure - */ -static int ioctl_init(struct v4l2_int_device *s) -{ - int sensorid = mt9v111_id_from_name(((struct sensor *)s->priv)->v4l2_int_device->name); - - pr_debug("In mt9v111:ioctl_init for sensor %d\n",sensorid); - - return 0; -} - static void mt9v111_ifp_reset ( int sensorid ) { mt9v111_write_reg(sensorid,MT9V111S_ADDR_SPACE_SEL, 0x0001); @@ -1144,6 +1131,27 @@ static void mt9v111_sensor_reset ( int sensorid ) } /*! + * ioctl_init - V4L2 sensor interface handler for VIDIOC_INT_INIT + * @s: pointer to standard V4L2 device structure + */ +static int ioctl_init(struct v4l2_int_device *s) +{ + int sensorid = 0; + + sensorid = mt9v111_id_from_name(((struct sensor *)s->priv)->v4l2_int_device->name); + if( sensorid < 0 ) + return 0; + + pr_debug("In mt9v111:ioctl_init for sensor %d\n",sensorid); + + mt9v111_sensor_reset(sensorid); + mt9v111_ifp_reset(sensorid); + mt9v111_sensor_lib_datasheet(sensorid,mt9v111_device.coreReg, mt9v111_device.ifpReg); + + return 0; +} + +/*! * ioctl_dev_init - V4L2 sensor interface handler for vidioc_int_dev_init_num * @s: pointer to standard V4L2 device structure * |