summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/mt9v022.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2009-08-25 16:53:23 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-09-19 05:19:18 +0200
commita4c56fd8892e51d675f7665ddee4fd9d7e5c2cc3 (patch)
treebf19f94a6bf467e2a366a9de9a229ff1149baf76 /drivers/media/video/mt9v022.c
parentV4L/DVB (12534): soc-camera: V4L2 API compliant scaling (S_FMT) and cropping ... (diff)
downloadlinux-a4c56fd8892e51d675f7665ddee4fd9d7e5c2cc3.tar.xz
linux-a4c56fd8892e51d675f7665ddee4fd9d7e5c2cc3.zip
V4L/DVB (12535): soc-camera: remove .init() and .release() methods from struct soc_camera_ops
Remove unneeded soc-camera operations, this also makes the soc-camera API to v4l2 subdevices thinner. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/mt9v022.c')
-rw-r--r--drivers/media/video/mt9v022.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/media/video/mt9v022.c b/drivers/media/video/mt9v022.c
index 35ea0ddd0715..5c47b55823c8 100644
--- a/drivers/media/video/mt9v022.c
+++ b/drivers/media/video/mt9v022.c
@@ -138,9 +138,8 @@ static int reg_clear(struct i2c_client *client, const u8 reg,
return reg_write(client, reg, ret & ~data);
}
-static int mt9v022_init(struct soc_camera_device *icd)
+static int mt9v022_init(struct i2c_client *client)
{
- struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd));
struct mt9v022 *mt9v022 = to_mt9v022(client);
int ret;
@@ -532,7 +531,6 @@ static const struct v4l2_queryctrl mt9v022_controls[] = {
};
static struct soc_camera_ops mt9v022_ops = {
- .init = mt9v022_init,
.set_bus_param = mt9v022_set_bus_param,
.query_bus_param = mt9v022_query_bus_param,
.controls = mt9v022_controls,
@@ -751,6 +749,10 @@ static int mt9v022_video_probe(struct soc_camera_device *icd,
data, mt9v022->model == V4L2_IDENT_MT9V022IX7ATM ?
"monochrome" : "colour");
+ ret = mt9v022_init(client);
+ if (ret < 0)
+ dev_err(&client->dev, "Failed to initialise the camera\n");
+
ei2c:
return ret;
}