diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-05-29 06:59:36 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-06-17 08:41:17 -0300 |
commit | 076c3454d645ac937bfc293235e3a31e31794114 (patch) | |
tree | 5ef960b5ffc9618bb48a0700278f6c0b521b5802 /drivers/media/pci/cx18/cx18-av-core.c | |
parent | [media] v4l2: remove g_chip_ident from bridge drivers where it is easy to do so (diff) | |
download | linux-dev-076c3454d645ac937bfc293235e3a31e31794114.tar.xz linux-dev-076c3454d645ac937bfc293235e3a31e31794114.zip |
[media] cx18: remove g_chip_ident support
The av-core is really a subdev, so there is no need anymore to act as if it
is a 'second' bridge chip.
As a result of this the g_chip_ident implementation can be completely dropped.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/pci/cx18/cx18-av-core.c')
-rw-r--r-- | drivers/media/pci/cx18/cx18-av-core.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/drivers/media/pci/cx18/cx18-av-core.c b/drivers/media/pci/cx18/cx18-av-core.c index ba8caf0fbb85..c4890a430dc6 100644 --- a/drivers/media/pci/cx18/cx18-av-core.c +++ b/drivers/media/pci/cx18/cx18-av-core.c @@ -22,7 +22,6 @@ * 02110-1301, USA. */ -#include <media/v4l2-chip-ident.h> #include "cx18-driver.h" #include "cx18-io.h" #include "cx18-cards.h" @@ -1231,31 +1230,12 @@ static int cx18_av_log_status(struct v4l2_subdev *sd) return 0; } -static inline int cx18_av_dbg_match(const struct v4l2_dbg_match *match) -{ - return match->type == V4L2_CHIP_MATCH_HOST && match->addr == 1; -} - -static int cx18_av_g_chip_ident(struct v4l2_subdev *sd, - struct v4l2_dbg_chip_ident *chip) -{ - struct cx18_av_state *state = to_cx18_av_state(sd); - - if (cx18_av_dbg_match(&chip->match)) { - chip->ident = state->id; - chip->revision = state->rev; - } - return 0; -} - #ifdef CONFIG_VIDEO_ADV_DEBUG static int cx18_av_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg) { struct cx18 *cx = v4l2_get_subdevdata(sd); - if (!cx18_av_dbg_match(®->match)) - return -EINVAL; if ((reg->reg & 0x3) != 0) return -EINVAL; reg->size = 4; @@ -1268,8 +1248,6 @@ static int cx18_av_s_register(struct v4l2_subdev *sd, { struct cx18 *cx = v4l2_get_subdevdata(sd); - if (!cx18_av_dbg_match(®->match)) - return -EINVAL; if ((reg->reg & 0x3) != 0) return -EINVAL; cx18_av_write4(cx, reg->reg & 0x00000ffc, reg->val); @@ -1282,17 +1260,9 @@ static const struct v4l2_ctrl_ops cx18_av_ctrl_ops = { }; static const struct v4l2_subdev_core_ops cx18_av_general_ops = { - .g_chip_ident = cx18_av_g_chip_ident, .log_status = cx18_av_log_status, .load_fw = cx18_av_load_fw, .reset = cx18_av_reset, - .g_ctrl = v4l2_subdev_g_ctrl, - .s_ctrl = v4l2_subdev_s_ctrl, - .s_ext_ctrls = v4l2_subdev_s_ext_ctrls, - .try_ext_ctrls = v4l2_subdev_try_ext_ctrls, - .g_ext_ctrls = v4l2_subdev_g_ext_ctrls, - .queryctrl = v4l2_subdev_queryctrl, - .querymenu = v4l2_subdev_querymenu, .s_std = cx18_av_s_std, #ifdef CONFIG_VIDEO_ADV_DEBUG .g_register = cx18_av_g_register, @@ -1340,8 +1310,6 @@ int cx18_av_probe(struct cx18 *cx) int err; state->rev = cx18_av_read4(cx, CXADEC_CHIP_CTRL) & 0xffff; - state->id = ((state->rev >> 4) == CXADEC_CHIP_TYPE_MAKO) - ? V4L2_IDENT_CX23418_843 : V4L2_IDENT_UNKNOWN; state->vid_input = CX18_AV_COMPOSITE7; state->aud_input = CX18_AV_AUDIO8; |