aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/mt9t031.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/mt9t031.c')
-rw-r--r--drivers/media/video/mt9t031.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/drivers/media/video/mt9t031.c b/drivers/media/video/mt9t031.c
index f234ba602049..9a6489689382 100644
--- a/drivers/media/video/mt9t031.c
+++ b/drivers/media/video/mt9t031.c
@@ -163,20 +163,6 @@ static int mt9t031_disable(struct i2c_client *client)
163 return 0; 163 return 0;
164} 164}
165 165
166static int mt9t031_init(struct soc_camera_device *icd)
167{
168 struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd));
169
170 return mt9t031_idle(client);
171}
172
173static int mt9t031_release(struct soc_camera_device *icd)
174{
175 struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd));
176
177 return mt9t031_disable(client);
178}
179
180static int mt9t031_s_stream(struct v4l2_subdev *sd, int enable) 166static int mt9t031_s_stream(struct v4l2_subdev *sd, int enable)
181{ 167{
182 struct i2c_client *client = sd->priv; 168 struct i2c_client *client = sd->priv;
@@ -539,8 +525,6 @@ static const struct v4l2_queryctrl mt9t031_controls[] = {
539}; 525};
540 526
541static struct soc_camera_ops mt9t031_ops = { 527static struct soc_camera_ops mt9t031_ops = {
542 .init = mt9t031_init,
543 .release = mt9t031_release,
544 .set_bus_param = mt9t031_set_bus_param, 528 .set_bus_param = mt9t031_set_bus_param,
545 .query_bus_param = mt9t031_query_bus_param, 529 .query_bus_param = mt9t031_query_bus_param,
546 .controls = mt9t031_controls, 530 .controls = mt9t031_controls,
@@ -689,6 +673,7 @@ static int mt9t031_video_probe(struct i2c_client *client)
689 struct soc_camera_device *icd = client->dev.platform_data; 673 struct soc_camera_device *icd = client->dev.platform_data;
690 struct mt9t031 *mt9t031 = to_mt9t031(client); 674 struct mt9t031 *mt9t031 = to_mt9t031(client);
691 s32 data; 675 s32 data;
676 int ret;
692 677
693 /* Enable the chip */ 678 /* Enable the chip */
694 data = reg_write(client, MT9T031_CHIP_ENABLE, 1); 679 data = reg_write(client, MT9T031_CHIP_ENABLE, 1);
@@ -711,7 +696,11 @@ static int mt9t031_video_probe(struct i2c_client *client)
711 696
712 dev_info(&client->dev, "Detected a MT9T031 chip ID %x\n", data); 697 dev_info(&client->dev, "Detected a MT9T031 chip ID %x\n", data);
713 698
714 return 0; 699 ret = mt9t031_idle(client);
700 if (ret < 0)
701 dev_err(&client->dev, "Failed to initialise the camera\n");
702
703 return ret;
715} 704}
716 705
717static struct v4l2_subdev_core_ops mt9t031_subdev_core_ops = { 706static struct v4l2_subdev_core_ops mt9t031_subdev_core_ops = {