From: Hans Verkuil Date: Thu, 6 Sep 2012 12:53:08 +0000 (-0300) Subject: [media] em28xx: fix VIDIOC_DBG_G_CHIP_IDENT compliance errors X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=319a55fbe4c1d3bbe8abe3900e6dc91440ec9b0b;p=openwrt%2Fstaging%2Fblogic.git [media] em28xx: fix VIDIOC_DBG_G_CHIP_IDENT compliance errors Signed-off-by: Hans Verkuil Signed-off-by: Devin Heitmueller Signed-off-by: Mauro Carvalho Chehab --- 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, chip->ident = V4L2_IDENT_NONE; 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);