diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2012-09-06 08:53:08 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-01-04 21:47:10 -0500 |
commit | 319a55fbe4c1d3bbe8abe3900e6dc91440ec9b0b (patch) | |
tree | 3baa0938a90a3329dbfe9f241dbe596e2e6ef532 | |
parent | dd5a4363224614489f6fef25272328ba949a4121 (diff) |
[media] em28xx: fix VIDIOC_DBG_G_CHIP_IDENT compliance errors
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/usb/em28xx/em28xx-video.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c index f025440bf953..b71df42aa7bb 100644 --- a/drivers/media/usb/em28xx/em28xx-video.c +++ b/drivers/media/usb/em28xx/em28xx-video.c | |||
@@ -1403,6 +1403,14 @@ static int vidioc_g_chip_ident(struct file *file, void *priv, | |||
1403 | 1403 | ||
1404 | chip->ident = V4L2_IDENT_NONE; | 1404 | chip->ident = V4L2_IDENT_NONE; |
1405 | chip->revision = 0; | 1405 | chip->revision = 0; |
1406 | if (chip->match.type == V4L2_CHIP_MATCH_HOST) { | ||
1407 | if (v4l2_chip_match_host(&chip->match)) | ||
1408 | chip->ident = V4L2_IDENT_NONE; | ||
1409 | return 0; | ||
1410 | } | ||
1411 | if (chip->match.type != V4L2_CHIP_MATCH_I2C_DRIVER && | ||
1412 | chip->match.type != V4L2_CHIP_MATCH_I2C_ADDR) | ||
1413 | return -EINVAL; | ||
1406 | 1414 | ||
1407 | v4l2_device_call_all(&dev->v4l2_dev, 0, core, g_chip_ident, chip); | 1415 | v4l2_device_call_all(&dev->v4l2_dev, 0, core, g_chip_ident, chip); |
1408 | 1416 | ||