]> err.no Git - linux-2.6/blobdiff - drivers/media/video/cs5345.c
V4L/DVB (8482): videodev: move all ioctl callbacks to a new v4l2_ioctl_ops struct
[linux-2.6] / drivers / media / video / cs5345.c
index 2a429f9e32cde03068e7ea72a0ddeb93316496e1..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
@@ -160,10 +160,16 @@ static int cs5345_probe(struct i2c_client *client,
 
 /* ----------------------------------------------------------------------- */
 
+static const struct i2c_device_id cs5345_id[] = {
+       { "cs5345", 0 },
+       { }
+};
+MODULE_DEVICE_TABLE(i2c, cs5345_id);
+
 static struct v4l2_i2c_driver_data v4l2_i2c_data = {
        .name = "cs5345",
        .driverid = I2C_DRIVERID_CS5345,
        .command = cs5345_command,
        .probe = cs5345_probe,
+       .id_table = cs5345_id,
 };
-