mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 01:10:04 +00:00
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>
This commit is contained in:
parent
f73c8f53cc
commit
0a861e9eb7
4 changed files with 11 additions and 7 deletions
|
@ -417,7 +417,7 @@ static struct i2c_board_info __initdata ap325rxa_i2c_devices[] = {
|
|||
},
|
||||
{
|
||||
I2C_BOARD_INFO("ov772x", 0x21),
|
||||
.platform_data = &ov7725_info,
|
||||
.platform_data = &ov7725_info.link,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -430,11 +430,11 @@ static struct i2c_board_info migor_i2c_devices[] = {
|
|||
},
|
||||
{
|
||||
I2C_BOARD_INFO("ov772x", 0x21),
|
||||
.platform_data = &ov7725_info,
|
||||
.platform_data = &ov7725_info.link,
|
||||
},
|
||||
{
|
||||
I2C_BOARD_INFO("tw9910", 0x45),
|
||||
.platform_data = &tw9910_info,
|
||||
.platform_data = &tw9910_info.link,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -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 "
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue