aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/mt9m111.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2009-08-25 10:47:00 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-09-18 23:19:09 -0400
commit85f8be68125163085392ed4fc30adcbea641586d (patch)
tree1f265f7be42b78c559db067810514d4096ca1141 /drivers/media/video/mt9m111.c
parentc9c1f1c0dbe90b82939917fdc3e4c9ccad42342d (diff)
V4L/DVB (12531): soc-camera: Use I2C device for dev_{dbg,info,...} output in all clients
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/mt9m111.c')
-rw-r--r--drivers/media/video/mt9m111.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/media/video/mt9m111.c b/drivers/media/video/mt9m111.c
index bef415170186..3637376da755 100644
--- a/drivers/media/video/mt9m111.c
+++ b/drivers/media/video/mt9m111.c
@@ -400,10 +400,9 @@ static int mt9m111_s_crop(struct v4l2_subdev *sd, struct v4l2_crop *a)
400 struct v4l2_rect *rect = &a->c; 400 struct v4l2_rect *rect = &a->c;
401 struct i2c_client *client = sd->priv; 401 struct i2c_client *client = sd->priv;
402 struct mt9m111 *mt9m111 = to_mt9m111(client); 402 struct mt9m111 *mt9m111 = to_mt9m111(client);
403 struct soc_camera_device *icd = client->dev.platform_data;
404 int ret; 403 int ret;
405 404
406 dev_dbg(&icd->dev, "%s left=%d, top=%d, width=%d, height=%d\n", 405 dev_dbg(&client->dev, "%s left=%d, top=%d, width=%d, height=%d\n",
407 __func__, rect->left, rect->top, rect->width, 406 __func__, rect->left, rect->top, rect->width,
408 rect->height); 407 rect->height);
409 408
@@ -818,7 +817,7 @@ static int mt9m111_init(struct soc_camera_device *icd)
818 if (!ret) 817 if (!ret)
819 ret = mt9m111_set_autoexposure(client, mt9m111->autoexposure); 818 ret = mt9m111_set_autoexposure(client, mt9m111->autoexposure);
820 if (ret) 819 if (ret)
821 dev_err(&icd->dev, "mt9m11x init failed: %d\n", ret); 820 dev_err(&client->dev, "mt9m11x init failed: %d\n", ret);
822 return ret; 821 return ret;
823} 822}
824 823
@@ -833,7 +832,7 @@ static int mt9m111_release(struct soc_camera_device *icd)
833 mt9m111->powered = 0; 832 mt9m111->powered = 0;
834 833
835 if (ret < 0) 834 if (ret < 0)
836 dev_err(&icd->dev, "mt9m11x release failed: %d\n", ret); 835 dev_err(&client->dev, "mt9m11x release failed: %d\n", ret);
837 836
838 return ret; 837 return ret;
839} 838}
@@ -875,7 +874,7 @@ static int mt9m111_video_probe(struct soc_camera_device *icd,
875 break; 874 break;
876 default: 875 default:
877 ret = -ENODEV; 876 ret = -ENODEV;
878 dev_err(&icd->dev, 877 dev_err(&client->dev,
879 "No MT9M11x chip detected, register read %x\n", data); 878 "No MT9M11x chip detected, register read %x\n", data);
880 goto ei2c; 879 goto ei2c;
881 } 880 }
@@ -883,7 +882,7 @@ static int mt9m111_video_probe(struct soc_camera_device *icd,
883 icd->formats = mt9m111_colour_formats; 882 icd->formats = mt9m111_colour_formats;
884 icd->num_formats = ARRAY_SIZE(mt9m111_colour_formats); 883 icd->num_formats = ARRAY_SIZE(mt9m111_colour_formats);
885 884
886 dev_info(&icd->dev, "Detected a MT9M11x chip ID %x\n", data); 885 dev_info(&client->dev, "Detected a MT9M11x chip ID %x\n", data);
887 886
888 mt9m111->autoexposure = 1; 887 mt9m111->autoexposure = 1;
889 mt9m111->autowhitebalance = 1; 888 mt9m111->autowhitebalance = 1;