Commit 319a55fb authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] em28xx: fix VIDIOC_DBG_G_CHIP_IDENT compliance errors

Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarDevin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent dd5a4363
...@@ -1403,6 +1403,14 @@ static int vidioc_g_chip_ident(struct file *file, void *priv, ...@@ -1403,6 +1403,14 @@ static int vidioc_g_chip_ident(struct file *file, void *priv,
chip->ident = V4L2_IDENT_NONE; chip->ident = V4L2_IDENT_NONE;
chip->revision = 0; chip->revision = 0;
if (chip->match.type == V4L2_CHIP_MATCH_HOST) {
if (v4l2_chip_match_host(&chip->match))
chip->ident = V4L2_IDENT_NONE;
return 0;
}
if (chip->match.type != V4L2_CHIP_MATCH_I2C_DRIVER &&
chip->match.type != V4L2_CHIP_MATCH_I2C_ADDR)
return -EINVAL;
v4l2_device_call_all(&dev->v4l2_dev, 0, core, g_chip_ident, chip); v4l2_device_call_all(&dev->v4l2_dev, 0, core, g_chip_ident, chip);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment