diff options
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/tw9910.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/media/video/tw9910.c b/drivers/media/video/tw9910.c index e3a4942e0f37..3d8a45f0eb2a 100644 --- a/drivers/media/video/tw9910.c +++ b/drivers/media/video/tw9910.c | |||
@@ -863,7 +863,7 @@ static int tw9910_video_probe(struct soc_camera_device *icd, | |||
863 | struct i2c_client *client) | 863 | struct i2c_client *client) |
864 | { | 864 | { |
865 | struct tw9910_priv *priv = to_tw9910(client); | 865 | struct tw9910_priv *priv = to_tw9910(client); |
866 | s32 val; | 866 | s32 id; |
867 | 867 | ||
868 | /* | 868 | /* |
869 | * We must have a parent by now. And it cannot be a wrong one. | 869 | * We must have a parent by now. And it cannot be a wrong one. |
@@ -889,19 +889,20 @@ static int tw9910_video_probe(struct soc_camera_device *icd, | |||
889 | * check and show Product ID | 889 | * check and show Product ID |
890 | * So far only revisions 0 and 1 have been seen | 890 | * So far only revisions 0 and 1 have been seen |
891 | */ | 891 | */ |
892 | val = i2c_smbus_read_byte_data(client, ID); | 892 | id = i2c_smbus_read_byte_data(client, ID); |
893 | priv->revision = GET_REV(val); | 893 | priv->revision = GET_REV(id); |
894 | id = GET_ID(id); | ||
894 | 895 | ||
895 | if (0x0B != GET_ID(val) || | 896 | if (0x0B != id || |
896 | 0x01 < priv->revision) { | 897 | 0x01 < priv->revision) { |
897 | dev_err(&client->dev, | 898 | dev_err(&client->dev, |
898 | "Product ID error %x:%x\n", | 899 | "Product ID error %x:%x\n", |
899 | GET_ID(val), priv->revision); | 900 | id, priv->revision); |
900 | return -ENODEV; | 901 | return -ENODEV; |
901 | } | 902 | } |
902 | 903 | ||
903 | dev_info(&client->dev, | 904 | dev_info(&client->dev, |
904 | "tw9910 Product ID %0x:%0x\n", GET_ID(val), priv->revision); | 905 | "tw9910 Product ID %0x:%0x\n", id, priv->revision); |
905 | 906 | ||
906 | icd->vdev->tvnorms = V4L2_STD_NTSC | V4L2_STD_PAL; | 907 | icd->vdev->tvnorms = V4L2_STD_NTSC | V4L2_STD_PAL; |
907 | icd->vdev->current_norm = V4L2_STD_NTSC; | 908 | icd->vdev->current_norm = V4L2_STD_NTSC; |