diff options
author | Andy Walls <awalls@radix.net> | 2009-02-20 23:52:13 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 12:43:01 -0300 |
commit | ff2a20018094c593a35f4887bbdabf8926ddb6e6 (patch) | |
tree | e6c89f8e06e6006035420ea20a6754dd4ca7e89c /drivers/media/video/cx18/cx18-av-core.c | |
parent | fa3e70360c86480acbaa54c9791e843196327a66 (diff) |
V4L/DVB (10758): cx18: Convert I2C devices to v4l2_subdevices
This is a major perturbation to cx18 I2C device handling to convert it to the
v4l2_device/subdeivce framework. This change breaks GPIO audio multiplexer
control for the time being. It will be fixed in a coming change.
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx18/cx18-av-core.c')
-rw-r--r-- | drivers/media/video/cx18/cx18-av-core.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/media/video/cx18/cx18-av-core.c b/drivers/media/video/cx18/cx18-av-core.c index f9bb77a25ee9..2128070154d3 100644 --- a/drivers/media/video/cx18/cx18-av-core.c +++ b/drivers/media/video/cx18/cx18-av-core.c @@ -1209,9 +1209,10 @@ static const struct v4l2_subdev_ops cx18_av_ops = { .video = &cx18_av_video_ops, }; -int cx18_av_probe(struct cx18 *cx, struct v4l2_subdev **sd) +int cx18_av_probe(struct cx18 *cx) { struct cx18_av_state *state = &cx->av_state; + struct v4l2_subdev *sd; state->rev = cx18_av_read4(cx, CXADEC_CHIP_CTRL) & 0xffff; state->id = ((state->rev >> 4) == CXADEC_CHIP_TYPE_MAKO) @@ -1224,13 +1225,13 @@ int cx18_av_probe(struct cx18 *cx, struct v4l2_subdev **sd) state->slicer_line_delay = 0; state->slicer_line_offset = (10 + state->slicer_line_delay - 2); - *sd = &state->sd; - v4l2_subdev_init(*sd, &cx18_av_ops); - v4l2_set_subdevdata(*sd, cx); - snprintf((*sd)->name, sizeof((*sd)->name), + sd = &state->sd; + v4l2_subdev_init(sd, &cx18_av_ops); + v4l2_set_subdevdata(sd, cx); + snprintf(sd->name, sizeof(sd->name), "%s internal A/V decoder", cx->v4l2_dev.name); - (*sd)->grp_id = CX18_HW_CX23418; - return v4l2_device_register_subdev(&cx->v4l2_dev, *sd); + sd->grp_id = CX18_HW_418_AV; + return v4l2_device_register_subdev(&cx->v4l2_dev, sd); } void cx18_av_exit(struct cx18 *cx, struct v4l2_subdev *sd) |