aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/mt9v011.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2013-05-29 05:59:51 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-06-17 07:52:10 -0400
commite12771100c93e101a7a8b302b6c5d57cff7b1551 (patch)
treea831f1d64d92142e5ce4cbcdfcd5a6f623db04e9 /drivers/media/i2c/mt9v011.c
parent6be89daa03a4c99b0d22a59a660b225a592ed0a9 (diff)
[media] media/i2c: remove g_chip_ident op
This is no longer needed since the core now handles this through DBG_G_CHIP_INFO. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/i2c/mt9v011.c')
-rw-r--r--drivers/media/i2c/mt9v011.c24
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
407static int mt9v011_g_register(struct v4l2_subdev *sd, 406static 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, &reg->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,
421static int mt9v011_s_register(struct v4l2_subdev *sd, 415static 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, &reg->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
435static 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
447static int mt9v011_s_ctrl(struct v4l2_ctrl *ctrl) 424static 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
486static const struct v4l2_subdev_core_ops mt9v011_core_ops = { 463static 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,