aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tw9910.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/tw9910.c')
-rw-r--r--drivers/media/video/tw9910.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/video/tw9910.c b/drivers/media/video/tw9910.c
index a39947643992..aa5065ea09ed 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,
875 const struct tw9910_scale_ctrl *scale; 875 const struct tw9910_scale_ctrl *scale;
876 int i, ret; 876 int i, ret;
877 877
878 info = client->dev.platform_data; 878 if (!client->dev.platform_data)
879 if (!info)
880 return -EINVAL; 879 return -EINVAL;
881 880
881 info = container_of(client->dev.platform_data,
882 struct tw9910_video_info, link);
883
882 if (!i2c_check_functionality(to_i2c_adapter(client->dev.parent), 884 if (!i2c_check_functionality(to_i2c_adapter(client->dev.parent),
883 I2C_FUNC_SMBUS_BYTE_DATA)) { 885 I2C_FUNC_SMBUS_BYTE_DATA)) {
884 dev_err(&client->dev, 886 dev_err(&client->dev,