V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead...
[safe/jmp/linux-2.6] / drivers / media / video / mt9m001.c
index 1a1a124..c1bf75e 100644 (file)
@@ -343,14 +343,14 @@ static int mt9m001_try_fmt(struct soc_camera_device *icd,
 }
 
 static int mt9m001_get_chip_id(struct soc_camera_device *icd,
-                              struct v4l2_chip_ident *id)
+                              struct v4l2_dbg_chip_ident *id)
 {
        struct mt9m001 *mt9m001 = container_of(icd, struct mt9m001, icd);
 
-       if (id->match_type != V4L2_CHIP_MATCH_I2C_ADDR)
+       if (id->match.type != V4L2_CHIP_MATCH_I2C_ADDR)
                return -EINVAL;
 
-       if (id->match_chip != mt9m001->client->addr)
+       if (id->match.addr != mt9m001->client->addr)
                return -ENODEV;
 
        id->ident       = mt9m001->model;
@@ -361,16 +361,17 @@ static int mt9m001_get_chip_id(struct soc_camera_device *icd,
 
 #ifdef CONFIG_VIDEO_ADV_DEBUG
 static int mt9m001_get_register(struct soc_camera_device *icd,
-                               struct v4l2_register *reg)
+                               struct v4l2_dbg_register *reg)
 {
        struct mt9m001 *mt9m001 = container_of(icd, struct mt9m001, icd);
 
-       if (reg->match_type != V4L2_CHIP_MATCH_I2C_ADDR || reg->reg > 0xff)
+       if (reg->match.type != V4L2_CHIP_MATCH_I2C_ADDR || reg->reg > 0xff)
                return -EINVAL;
 
-       if (reg->match_chip != mt9m001->client->addr)
+       if (reg->match.addr != mt9m001->client->addr)
                return -ENODEV;
 
+       reg->size = 2;
        reg->val = reg_read(icd, reg->reg);
 
        if (reg->val > 0xffff)
@@ -380,14 +381,14 @@ static int mt9m001_get_register(struct soc_camera_device *icd,
 }
 
 static int mt9m001_set_register(struct soc_camera_device *icd,
-                               struct v4l2_register *reg)
+                               struct v4l2_dbg_register *reg)
 {
        struct mt9m001 *mt9m001 = container_of(icd, struct mt9m001, icd);
 
-       if (reg->match_type != V4L2_CHIP_MATCH_I2C_ADDR || reg->reg > 0xff)
+       if (reg->match.type != V4L2_CHIP_MATCH_I2C_ADDR || reg->reg > 0xff)
                return -EINVAL;
 
-       if (reg->match_chip != mt9m001->client->addr)
+       if (reg->match.addr != mt9m001->client->addr)
                return -ENODEV;
 
        if (reg_write(icd, reg->reg, reg->val) < 0)