diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/ov772x.c | 4 | ||||
-rw-r--r-- | drivers/media/video/tw9910.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/media/video/ov772x.c b/drivers/media/video/ov772x.c index 205229333466..dcb690cb5ae7 100644 --- a/drivers/media/video/ov772x.c +++ b/drivers/media/video/ov772x.c | |||
@@ -1143,10 +1143,10 @@ static int ov772x_probe(struct i2c_client *client, | |||
1143 | } | 1143 | } |
1144 | 1144 | ||
1145 | icl = to_soc_camera_link(icd); | 1145 | icl = to_soc_camera_link(icd); |
1146 | if (!icl) | 1146 | if (!icl || !icl->priv) |
1147 | return -EINVAL; | 1147 | return -EINVAL; |
1148 | 1148 | ||
1149 | info = container_of(icl, struct ov772x_camera_info, link); | 1149 | info = icl->priv; |
1150 | 1150 | ||
1151 | if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) { | 1151 | if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) { |
1152 | dev_err(&adapter->dev, | 1152 | dev_err(&adapter->dev, |
diff --git a/drivers/media/video/tw9910.c b/drivers/media/video/tw9910.c index 3cb9ba6caa41..35373d8bf6a0 100644 --- a/drivers/media/video/tw9910.c +++ b/drivers/media/video/tw9910.c | |||
@@ -955,10 +955,10 @@ static int tw9910_probe(struct i2c_client *client, | |||
955 | } | 955 | } |
956 | 956 | ||
957 | icl = to_soc_camera_link(icd); | 957 | icl = to_soc_camera_link(icd); |
958 | if (!icl) | 958 | if (!icl || !icl->priv) |
959 | return -EINVAL; | 959 | return -EINVAL; |
960 | 960 | ||
961 | info = container_of(icl, struct tw9910_video_info, link); | 961 | info = icl->priv; |
962 | 962 | ||
963 | if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) { | 963 | if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) { |
964 | dev_err(&client->dev, | 964 | dev_err(&client->dev, |
@@ -976,7 +976,7 @@ static int tw9910_probe(struct i2c_client *client, | |||
976 | v4l2_i2c_subdev_init(&priv->subdev, client, &tw9910_subdev_ops); | 976 | v4l2_i2c_subdev_init(&priv->subdev, client, &tw9910_subdev_ops); |
977 | 977 | ||
978 | icd->ops = &tw9910_ops; | 978 | icd->ops = &tw9910_ops; |
979 | icd->iface = info->link.bus_id; | 979 | icd->iface = icl->bus_id; |
980 | 980 | ||
981 | ret = tw9910_video_probe(icd, client); | 981 | ret = tw9910_video_probe(icd, client); |
982 | if (ret) { | 982 | if (ret) { |