V4L/DVB (8422): cs5345: fix incorrect mask with VIDIOC_DBG_S_REGISTER
authorHans Verkuil <hverkuil@xs4all.nl>
Fri, 18 Jul 2008 23:14:31 +0000 (20:14 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Wed, 23 Jul 2008 11:09:18 +0000 (08:09 -0300)
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/cs5345.c

index 1c3fa3a7470a3f9b7dd3f316aa14fe810d51631a..61d14d26686fdc05dffa7f1baf8185a861115d27 100644 (file)
@@ -111,7 +111,7 @@ static int cs5345_command(struct i2c_client *client, unsigned cmd, void *arg)
                if (cmd == VIDIOC_DBG_G_REGISTER)
                        reg->val = cs5345_read(client, reg->reg & 0x1f);
                else
-                       cs5345_write(client, reg->reg & 0x1f, reg->val & 0x1f);
+                       cs5345_write(client, reg->reg & 0x1f, reg->val & 0xff);
                break;
        }
 #endif