diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-07-05 15:27:33 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-07-05 15:27:33 -0300 |
commit | e1afff6e5f2d6b35928ab6651ac5705659713ca0 (patch) | |
tree | 2157e6ad82bd192b4f9799c80882ed0cf82522e6 /linux/drivers/media/video | |
parent | aebfdafbbe60eb6798f9e81686a33b519af8e3c8 (diff) | |
download | mediapointer-dvb-s2-e1afff6e5f2d6b35928ab6651ac5705659713ca0.tar.gz mediapointer-dvb-s2-e1afff6e5f2d6b35928ab6651ac5705659713ca0.tar.bz2 |
backport commit 0a861e9eb76c68b23be1aa4758269c5b412089a9
From: Mauro Carvalho Chehab <mchehab@redhat.com>
kernel-sync:
Author: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Date: Tue May 12 15:13:32 2009 +0000
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: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r-- | linux/drivers/media/video/ov772x.c | 6 | ||||
-rw-r--r-- | linux/drivers/media/video/tw9910.c | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/linux/drivers/media/video/ov772x.c b/linux/drivers/media/video/ov772x.c index b17a7400d..4b0363940 100644 --- a/linux/drivers/media/video/ov772x.c +++ b/linux/drivers/media/video/ov772x.c @@ -1071,10 +1071,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/linux/drivers/media/video/tw9910.c b/linux/drivers/media/video/tw9910.c index 5c145085a..f75787594 100644 --- a/linux/drivers/media/video/tw9910.c +++ b/linux/drivers/media/video/tw9910.c @@ -879,10 +879,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, |