diff options
Diffstat (limited to 'drivers/media/i2c/tvp7002.c')
-rw-r--r-- | drivers/media/i2c/tvp7002.c | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/drivers/media/i2c/tvp7002.c b/drivers/media/i2c/tvp7002.c index f339e6faca90..c2d0280ef3dc 100644 --- a/drivers/media/i2c/tvp7002.c +++ b/drivers/media/i2c/tvp7002.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <linux/v4l2-dv-timings.h> | 32 | #include <linux/v4l2-dv-timings.h> |
33 | #include <media/tvp7002.h> | 33 | #include <media/tvp7002.h> |
34 | #include <media/v4l2-device.h> | 34 | #include <media/v4l2-device.h> |
35 | #include <media/v4l2-chip-ident.h> | ||
36 | #include <media/v4l2-common.h> | 35 | #include <media/v4l2-common.h> |
37 | #include <media/v4l2-ctrls.h> | 36 | #include <media/v4l2-ctrls.h> |
38 | #include "tvp7002_reg.h" | 37 | #include "tvp7002_reg.h" |
@@ -533,29 +532,6 @@ static inline void tvp7002_write_err(struct v4l2_subdev *sd, u8 reg, | |||
533 | } | 532 | } |
534 | 533 | ||
535 | /* | 534 | /* |
536 | * tvp7002_g_chip_ident() - Get chip identification number | ||
537 | * @sd: ptr to v4l2_subdev struct | ||
538 | * @chip: ptr to v4l2_dbg_chip_ident struct | ||
539 | * | ||
540 | * Obtains the chip's identification number. | ||
541 | * Returns zero or -EINVAL if read operation fails. | ||
542 | */ | ||
543 | static int tvp7002_g_chip_ident(struct v4l2_subdev *sd, | ||
544 | struct v4l2_dbg_chip_ident *chip) | ||
545 | { | ||
546 | u8 rev; | ||
547 | int error; | ||
548 | struct i2c_client *client = v4l2_get_subdevdata(sd); | ||
549 | |||
550 | error = tvp7002_read(sd, TVP7002_CHIP_REV, &rev); | ||
551 | |||
552 | if (error < 0) | ||
553 | return error; | ||
554 | |||
555 | return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_TVP7002, rev); | ||
556 | } | ||
557 | |||
558 | /* | ||
559 | * tvp7002_write_inittab() - Write initialization values | 535 | * tvp7002_write_inittab() - Write initialization values |
560 | * @sd: ptr to v4l2_subdev struct | 536 | * @sd: ptr to v4l2_subdev struct |
561 | * @regs: ptr to i2c_reg_value struct | 537 | * @regs: ptr to i2c_reg_value struct |
@@ -741,13 +717,9 @@ static int tvp7002_query_dv_timings(struct v4l2_subdev *sd, | |||
741 | static int tvp7002_g_register(struct v4l2_subdev *sd, | 717 | static int tvp7002_g_register(struct v4l2_subdev *sd, |
742 | struct v4l2_dbg_register *reg) | 718 | struct v4l2_dbg_register *reg) |
743 | { | 719 | { |
744 | struct i2c_client *client = v4l2_get_subdevdata(sd); | ||
745 | u8 val; | 720 | u8 val; |
746 | int ret; | 721 | int ret; |
747 | 722 | ||
748 | if (!v4l2_chip_match_i2c_client(client, ®->match)) | ||
749 | return -EINVAL; | ||
750 | |||
751 | ret = tvp7002_read(sd, reg->reg & 0xff, &val); | 723 | ret = tvp7002_read(sd, reg->reg & 0xff, &val); |
752 | reg->val = val; | 724 | reg->val = val; |
753 | return ret; | 725 | return ret; |
@@ -764,11 +736,6 @@ static int tvp7002_g_register(struct v4l2_subdev *sd, | |||
764 | static int tvp7002_s_register(struct v4l2_subdev *sd, | 736 | static int tvp7002_s_register(struct v4l2_subdev *sd, |
765 | const struct v4l2_dbg_register *reg) | 737 | const struct v4l2_dbg_register *reg) |
766 | { | 738 | { |
767 | struct i2c_client *client = v4l2_get_subdevdata(sd); | ||
768 | |||
769 | if (!v4l2_chip_match_i2c_client(client, ®->match)) | ||
770 | return -EINVAL; | ||
771 | |||
772 | return tvp7002_write(sd, reg->reg & 0xff, reg->val & 0xff); | 739 | return tvp7002_write(sd, reg->reg & 0xff, reg->val & 0xff); |
773 | } | 740 | } |
774 | #endif | 741 | #endif |
@@ -933,7 +900,6 @@ tvp7002_set_pad_format(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, | |||
933 | 900 | ||
934 | /* V4L2 core operation handlers */ | 901 | /* V4L2 core operation handlers */ |
935 | static const struct v4l2_subdev_core_ops tvp7002_core_ops = { | 902 | static const struct v4l2_subdev_core_ops tvp7002_core_ops = { |
936 | .g_chip_ident = tvp7002_g_chip_ident, | ||
937 | .log_status = tvp7002_log_status, | 903 | .log_status = tvp7002_log_status, |
938 | .g_ext_ctrls = v4l2_subdev_g_ext_ctrls, | 904 | .g_ext_ctrls = v4l2_subdev_g_ext_ctrls, |
939 | .try_ext_ctrls = v4l2_subdev_try_ext_ctrls, | 905 | .try_ext_ctrls = v4l2_subdev_try_ext_ctrls, |