aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/mt9v022.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/mt9v022.c')
-rw-r--r--drivers/media/video/mt9v022.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/media/video/mt9v022.c b/drivers/media/video/mt9v022.c
index 14a5f9c21ffa..b04c8cb1644d 100644
--- a/drivers/media/video/mt9v022.c
+++ b/drivers/media/video/mt9v022.c
@@ -422,14 +422,14 @@ static int mt9v022_try_fmt(struct soc_camera_device *icd,
422} 422}
423 423
424static int mt9v022_get_chip_id(struct soc_camera_device *icd, 424static int mt9v022_get_chip_id(struct soc_camera_device *icd,
425 struct v4l2_chip_ident *id) 425 struct v4l2_dbg_chip_ident *id)
426{ 426{
427 struct mt9v022 *mt9v022 = container_of(icd, struct mt9v022, icd); 427 struct mt9v022 *mt9v022 = container_of(icd, struct mt9v022, icd);
428 428
429 if (id->match_type != V4L2_CHIP_MATCH_I2C_ADDR) 429 if (id->match.type != V4L2_CHIP_MATCH_I2C_ADDR)
430 return -EINVAL; 430 return -EINVAL;
431 431
432 if (id->match_chip != mt9v022->client->addr) 432 if (id->match.addr != mt9v022->client->addr)
433 return -ENODEV; 433 return -ENODEV;
434 434
435 id->ident = mt9v022->model; 435 id->ident = mt9v022->model;
@@ -440,16 +440,17 @@ static int mt9v022_get_chip_id(struct soc_camera_device *icd,
440 440
441#ifdef CONFIG_VIDEO_ADV_DEBUG 441#ifdef CONFIG_VIDEO_ADV_DEBUG
442static int mt9v022_get_register(struct soc_camera_device *icd, 442static int mt9v022_get_register(struct soc_camera_device *icd,
443 struct v4l2_register *reg) 443 struct v4l2_dbg_register *reg)
444{ 444{
445 struct mt9v022 *mt9v022 = container_of(icd, struct mt9v022, icd); 445 struct mt9v022 *mt9v022 = container_of(icd, struct mt9v022, icd);
446 446
447 if (reg->match_type != V4L2_CHIP_MATCH_I2C_ADDR || reg->reg > 0xff) 447 if (reg->match.type != V4L2_CHIP_MATCH_I2C_ADDR || reg->reg > 0xff)
448 return -EINVAL; 448 return -EINVAL;
449 449
450 if (reg->match_chip != mt9v022->client->addr) 450 if (reg->match.addr != mt9v022->client->addr)
451 return -ENODEV; 451 return -ENODEV;
452 452
453 reg->size = 2;
453 reg->val = reg_read(icd, reg->reg); 454 reg->val = reg_read(icd, reg->reg);
454 455
455 if (reg->val > 0xffff) 456 if (reg->val > 0xffff)
@@ -459,14 +460,14 @@ static int mt9v022_get_register(struct soc_camera_device *icd,
459} 460}
460 461
461static int mt9v022_set_register(struct soc_camera_device *icd, 462static int mt9v022_set_register(struct soc_camera_device *icd,
462 struct v4l2_register *reg) 463 struct v4l2_dbg_register *reg)
463{ 464{
464 struct mt9v022 *mt9v022 = container_of(icd, struct mt9v022, icd); 465 struct mt9v022 *mt9v022 = container_of(icd, struct mt9v022, icd);
465 466
466 if (reg->match_type != V4L2_CHIP_MATCH_I2C_ADDR || reg->reg > 0xff) 467 if (reg->match.type != V4L2_CHIP_MATCH_I2C_ADDR || reg->reg > 0xff)
467 return -EINVAL; 468 return -EINVAL;
468 469
469 if (reg->match_chip != mt9v022->client->addr) 470 if (reg->match.addr != mt9v022->client->addr)
470 return -ENODEV; 471 return -ENODEV;
471 472
472 if (reg_write(icd, reg->reg, reg->val) < 0) 473 if (reg_write(icd, reg->reg, reg->val) < 0)