diff options
Diffstat (limited to 'drivers/media/i2c/mt9v011.c')
-rw-r--r-- | drivers/media/i2c/mt9v011.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/drivers/media/i2c/mt9v011.c b/drivers/media/i2c/mt9v011.c index 141919bf77fc..f74698cf14c9 100644 --- a/drivers/media/i2c/mt9v011.c +++ b/drivers/media/i2c/mt9v011.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <asm/div64.h> | 13 | #include <asm/div64.h> |
14 | #include <media/v4l2-device.h> | 14 | #include <media/v4l2-device.h> |
15 | #include <media/v4l2-chip-ident.h> | ||
16 | #include <media/v4l2-ctrls.h> | 15 | #include <media/v4l2-ctrls.h> |
17 | #include <media/mt9v011.h> | 16 | #include <media/mt9v011.h> |
18 | 17 | ||
@@ -407,11 +406,6 @@ static int mt9v011_s_mbus_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt | |||
407 | static int mt9v011_g_register(struct v4l2_subdev *sd, | 406 | static int mt9v011_g_register(struct v4l2_subdev *sd, |
408 | struct v4l2_dbg_register *reg) | 407 | struct v4l2_dbg_register *reg) |
409 | { | 408 | { |
410 | struct i2c_client *client = v4l2_get_subdevdata(sd); | ||
411 | |||
412 | if (!v4l2_chip_match_i2c_client(client, ®->match)) | ||
413 | return -EINVAL; | ||
414 | |||
415 | reg->val = mt9v011_read(sd, reg->reg & 0xff); | 409 | reg->val = mt9v011_read(sd, reg->reg & 0xff); |
416 | reg->size = 2; | 410 | reg->size = 2; |
417 | 411 | ||
@@ -421,29 +415,12 @@ static int mt9v011_g_register(struct v4l2_subdev *sd, | |||
421 | static int mt9v011_s_register(struct v4l2_subdev *sd, | 415 | static int mt9v011_s_register(struct v4l2_subdev *sd, |
422 | const struct v4l2_dbg_register *reg) | 416 | const struct v4l2_dbg_register *reg) |
423 | { | 417 | { |
424 | struct i2c_client *client = v4l2_get_subdevdata(sd); | ||
425 | |||
426 | if (!v4l2_chip_match_i2c_client(client, ®->match)) | ||
427 | return -EINVAL; | ||
428 | |||
429 | mt9v011_write(sd, reg->reg & 0xff, reg->val & 0xffff); | 418 | mt9v011_write(sd, reg->reg & 0xff, reg->val & 0xffff); |
430 | 419 | ||
431 | return 0; | 420 | return 0; |
432 | } | 421 | } |
433 | #endif | 422 | #endif |
434 | 423 | ||
435 | static int mt9v011_g_chip_ident(struct v4l2_subdev *sd, | ||
436 | struct v4l2_dbg_chip_ident *chip) | ||
437 | { | ||
438 | u16 version; | ||
439 | struct i2c_client *client = v4l2_get_subdevdata(sd); | ||
440 | |||
441 | version = mt9v011_read(sd, R00_MT9V011_CHIP_VERSION); | ||
442 | |||
443 | return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_MT9V011, | ||
444 | version); | ||
445 | } | ||
446 | |||
447 | static int mt9v011_s_ctrl(struct v4l2_ctrl *ctrl) | 424 | static int mt9v011_s_ctrl(struct v4l2_ctrl *ctrl) |
448 | { | 425 | { |
449 | struct mt9v011 *core = | 426 | struct mt9v011 *core = |
@@ -485,7 +462,6 @@ static struct v4l2_ctrl_ops mt9v011_ctrl_ops = { | |||
485 | 462 | ||
486 | static const struct v4l2_subdev_core_ops mt9v011_core_ops = { | 463 | static const struct v4l2_subdev_core_ops mt9v011_core_ops = { |
487 | .reset = mt9v011_reset, | 464 | .reset = mt9v011_reset, |
488 | .g_chip_ident = mt9v011_g_chip_ident, | ||
489 | #ifdef CONFIG_VIDEO_ADV_DEBUG | 465 | #ifdef CONFIG_VIDEO_ADV_DEBUG |
490 | .g_register = mt9v011_g_register, | 466 | .g_register = mt9v011_g_register, |
491 | .s_register = mt9v011_s_register, | 467 | .s_register = mt9v011_s_register, |