V4L/DVB (12408): em28xx: Implement g/s_register via address match
authorMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 9 Aug 2009 22:39:23 +0000 (19:39 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 12 Sep 2009 15:18:37 +0000 (12:18 -0300)
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/em28xx/em28xx-video.c

index f3ee001..a6bdbc2 100644 (file)
@@ -1314,8 +1314,9 @@ static int vidioc_g_register(struct file *file, void *priv,
                v4l2_device_call_all(&dev->v4l2_dev, 0, core, g_register, reg);
                return 0;
        case V4L2_CHIP_MATCH_I2C_ADDR:
-               /* Not supported yet */
-               return -EINVAL;
+               /* TODO: is this correct? */
+               v4l2_device_call_all(&dev->v4l2_dev, 0, core, g_register, reg);
+               return 0;
        default:
                if (!v4l2_chip_match_host(&reg->match))
                        return -EINVAL;
@@ -1366,8 +1367,9 @@ static int vidioc_s_register(struct file *file, void *priv,
                v4l2_device_call_all(&dev->v4l2_dev, 0, core, s_register, reg);
                return 0;
        case V4L2_CHIP_MATCH_I2C_ADDR:
-               /* Not supported yet */
-               return -EINVAL;
+               /* TODO: is this correct? */
+               v4l2_device_call_all(&dev->v4l2_dev, 0, core, s_register, reg);
+               return 0;
        default:
                if (!v4l2_chip_match_host(&reg->match))
                        return -EINVAL;