diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2009-05-12 15:13:32 +0000 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-06-17 16:22:34 +0900 |
commit | 0a861e9eb76c68b23be1aa4758269c5b412089a9 (patch) | |
tree | 4ec2284a725039e95dedd11b3b1fba6ead012349 /drivers/media/video | |
parent | f73c8f53ccc13ae13c6dbfa002083448a5ad0c81 (diff) |
soc-camera: unify i2c camera device platform data
Unify i2c camera device platform data to point to struct soc_camera_link
for a smooth transition to soc-camera as a platform driver.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/ov772x.c | 6 | ||||
-rw-r--r-- | drivers/media/video/tw9910.c | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/drivers/media/video/ov772x.c b/drivers/media/video/ov772x.c index c0d91125286..0bce255168b 100644 --- a/drivers/media/video/ov772x.c +++ b/drivers/media/video/ov772x.c @@ -1067,10 +1067,12 @@ static int ov772x_probe(struct i2c_client *client, struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); int ret; - info = client->dev.platform_data; - if (!info) + if (!client->dev.platform_data) return -EINVAL; + info = container_of(client->dev.platform_data, + struct ov772x_camera_info, link); + if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) { dev_err(&adapter->dev, "I2C-Adapter doesn't support " diff --git a/drivers/media/video/tw9910.c b/drivers/media/video/tw9910.c index a3994764399..aa5065ea09e 100644 --- a/drivers/media/video/tw9910.c +++ b/drivers/media/video/tw9910.c @@ -875,10 +875,12 @@ static int tw9910_probe(struct i2c_client *client, const struct tw9910_scale_ctrl *scale; int i, ret; - info = client->dev.platform_data; - if (!info) + if (!client->dev.platform_data) return -EINVAL; + info = container_of(client->dev.platform_data, + struct tw9910_video_info, link); + if (!i2c_check_functionality(to_i2c_adapter(client->dev.parent), I2C_FUNC_SMBUS_BYTE_DATA)) { dev_err(&client->dev, |