V4L/DVB (13478): cx18: remove bogus init call.

The cx18 av core implemented an init call for no good reason. It's now
turned into an internal function.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Reviewed-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Hans Verkuil 2009-11-25 11:55:04 -03:00 committed by Mauro Carvalho Chehab
parent dbc8e34a32
commit 7f3ea4debb
2 changed files with 7 additions and 8 deletions

View file

@ -99,10 +99,8 @@ int cx18_av_and_or4(struct cx18 *cx, u16 addr, u32 and_mask,
or_value); or_value);
} }
static int cx18_av_init(struct v4l2_subdev *sd, u32 val) static void cx18_av_init(struct cx18 *cx)
{ {
struct cx18 *cx = v4l2_get_subdevdata(sd);
/* /*
* The crystal freq used in calculations in this driver will be * The crystal freq used in calculations in this driver will be
* 28.636360 MHz. * 28.636360 MHz.
@ -125,7 +123,6 @@ static int cx18_av_init(struct v4l2_subdev *sd, u32 val)
/* SA_MCLK_SEL=1, SA_MCLK_DIV=0x16 */ /* SA_MCLK_SEL=1, SA_MCLK_DIV=0x16 */
cx18_av_write(cx, CXADEC_I2S_MCLK, 0x56); cx18_av_write(cx, CXADEC_I2S_MCLK, 0x56);
return 0;
} }
static void cx18_av_initialize(struct v4l2_subdev *sd) static void cx18_av_initialize(struct v4l2_subdev *sd)
@ -198,7 +195,7 @@ static void cx18_av_initialize(struct v4l2_subdev *sd)
cx18_av_and_or4(cx, CXADEC_CHIP_CTRL, 0xFFFBFFFF, 0x00120000); cx18_av_and_or4(cx, CXADEC_CHIP_CTRL, 0xFFFBFFFF, 0x00120000);
/* Setup the Video and and Aux/Audio PLLs */ /* Setup the Video and and Aux/Audio PLLs */
cx18_av_init(sd, 0); cx18_av_init(cx);
/* set video to auto-detect */ /* set video to auto-detect */
/* Clear bits 11-12 to enable slow locking mode. Set autodetect mode */ /* Clear bits 11-12 to enable slow locking mode. Set autodetect mode */
@ -1355,7 +1352,6 @@ static int cx18_av_s_register(struct v4l2_subdev *sd,
static const struct v4l2_subdev_core_ops cx18_av_general_ops = { static const struct v4l2_subdev_core_ops cx18_av_general_ops = {
.g_chip_ident = cx18_av_g_chip_ident, .g_chip_ident = cx18_av_g_chip_ident,
.log_status = cx18_av_log_status, .log_status = cx18_av_log_status,
.init = cx18_av_init,
.load_fw = cx18_av_load_fw, .load_fw = cx18_av_load_fw,
.reset = cx18_av_reset, .reset = cx18_av_reset,
.queryctrl = cx18_av_queryctrl, .queryctrl = cx18_av_queryctrl,
@ -1399,6 +1395,7 @@ int cx18_av_probe(struct cx18 *cx)
{ {
struct cx18_av_state *state = &cx->av_state; struct cx18_av_state *state = &cx->av_state;
struct v4l2_subdev *sd; struct v4l2_subdev *sd;
int err;
state->rev = cx18_av_read4(cx, CXADEC_CHIP_CTRL) & 0xffff; state->rev = cx18_av_read4(cx, CXADEC_CHIP_CTRL) & 0xffff;
state->id = ((state->rev >> 4) == CXADEC_CHIP_TYPE_MAKO) state->id = ((state->rev >> 4) == CXADEC_CHIP_TYPE_MAKO)
@ -1417,5 +1414,8 @@ int cx18_av_probe(struct cx18 *cx)
snprintf(sd->name, sizeof(sd->name), snprintf(sd->name, sizeof(sd->name),
"%s %03x", cx->v4l2_dev.name, (state->rev >> 4)); "%s %03x", cx->v4l2_dev.name, (state->rev >> 4));
sd->grp_id = CX18_HW_418_AV; sd->grp_id = CX18_HW_418_AV;
return v4l2_device_register_subdev(&cx->v4l2_dev, sd); err = v4l2_device_register_subdev(&cx->v4l2_dev, sd);
if (!err)
cx18_av_init(cx);
return err;
} }

View file

@ -912,7 +912,6 @@ static int __devinit cx18_probe(struct pci_dev *pci_dev,
CX18_ERR("Could not register A/V decoder subdevice\n"); CX18_ERR("Could not register A/V decoder subdevice\n");
goto free_map; goto free_map;
} }
cx18_call_hw(cx, CX18_HW_418_AV, core, init, 0);
/* Initialize GPIO Reset Controller to do chip resets during i2c init */ /* Initialize GPIO Reset Controller to do chip resets during i2c init */
if (cx->card->hw_all & CX18_HW_GPIO_RESET_CTRL) { if (cx->card->hw_all & CX18_HW_GPIO_RESET_CTRL) {