diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-11-25 09:55:04 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-12-05 15:42:05 -0500 |
commit | 7f3ea4debb8106287af87dd0ee770e97b59c1ac4 (patch) | |
tree | 8bac7fe9074f5e1337a663e94ee3847e2e6031e2 | |
parent | dbc8e34a3265e7ec6b2a07c4337c60a947768891 (diff) |
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>
-rw-r--r-- | drivers/media/video/cx18/cx18-av-core.c | 14 | ||||
-rw-r--r-- | drivers/media/video/cx18/cx18-driver.c | 1 |
2 files changed, 7 insertions, 8 deletions
diff --git a/drivers/media/video/cx18/cx18-av-core.c b/drivers/media/video/cx18/cx18-av-core.c index 536dedb23ba3..4392c76af5df 100644 --- a/drivers/media/video/cx18/cx18-av-core.c +++ b/drivers/media/video/cx18/cx18-av-core.c | |||
@@ -99,10 +99,8 @@ int cx18_av_and_or4(struct cx18 *cx, u16 addr, u32 and_mask, | |||
99 | or_value); | 99 | or_value); |
100 | } | 100 | } |
101 | 101 | ||
102 | static int cx18_av_init(struct v4l2_subdev *sd, u32 val) | 102 | static void cx18_av_init(struct cx18 *cx) |
103 | { | 103 | { |
104 | struct cx18 *cx = v4l2_get_subdevdata(sd); | ||
105 | |||
106 | /* | 104 | /* |
107 | * The crystal freq used in calculations in this driver will be | 105 | * The crystal freq used in calculations in this driver will be |
108 | * 28.636360 MHz. | 106 | * 28.636360 MHz. |
@@ -125,7 +123,6 @@ static int cx18_av_init(struct v4l2_subdev *sd, u32 val) | |||
125 | 123 | ||
126 | /* SA_MCLK_SEL=1, SA_MCLK_DIV=0x16 */ | 124 | /* SA_MCLK_SEL=1, SA_MCLK_DIV=0x16 */ |
127 | cx18_av_write(cx, CXADEC_I2S_MCLK, 0x56); | 125 | cx18_av_write(cx, CXADEC_I2S_MCLK, 0x56); |
128 | return 0; | ||
129 | } | 126 | } |
130 | 127 | ||
131 | static void cx18_av_initialize(struct v4l2_subdev *sd) | 128 | static void cx18_av_initialize(struct v4l2_subdev *sd) |
@@ -198,7 +195,7 @@ static void cx18_av_initialize(struct v4l2_subdev *sd) | |||
198 | cx18_av_and_or4(cx, CXADEC_CHIP_CTRL, 0xFFFBFFFF, 0x00120000); | 195 | cx18_av_and_or4(cx, CXADEC_CHIP_CTRL, 0xFFFBFFFF, 0x00120000); |
199 | 196 | ||
200 | /* Setup the Video and and Aux/Audio PLLs */ | 197 | /* Setup the Video and and Aux/Audio PLLs */ |
201 | cx18_av_init(sd, 0); | 198 | cx18_av_init(cx); |
202 | 199 | ||
203 | /* set video to auto-detect */ | 200 | /* set video to auto-detect */ |
204 | /* Clear bits 11-12 to enable slow locking mode. Set autodetect mode */ | 201 | /* 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, | |||
1355 | static const struct v4l2_subdev_core_ops cx18_av_general_ops = { | 1352 | static const struct v4l2_subdev_core_ops cx18_av_general_ops = { |
1356 | .g_chip_ident = cx18_av_g_chip_ident, | 1353 | .g_chip_ident = cx18_av_g_chip_ident, |
1357 | .log_status = cx18_av_log_status, | 1354 | .log_status = cx18_av_log_status, |
1358 | .init = cx18_av_init, | ||
1359 | .load_fw = cx18_av_load_fw, | 1355 | .load_fw = cx18_av_load_fw, |
1360 | .reset = cx18_av_reset, | 1356 | .reset = cx18_av_reset, |
1361 | .queryctrl = cx18_av_queryctrl, | 1357 | .queryctrl = cx18_av_queryctrl, |
@@ -1399,6 +1395,7 @@ int cx18_av_probe(struct cx18 *cx) | |||
1399 | { | 1395 | { |
1400 | struct cx18_av_state *state = &cx->av_state; | 1396 | struct cx18_av_state *state = &cx->av_state; |
1401 | struct v4l2_subdev *sd; | 1397 | struct v4l2_subdev *sd; |
1398 | int err; | ||
1402 | 1399 | ||
1403 | state->rev = cx18_av_read4(cx, CXADEC_CHIP_CTRL) & 0xffff; | 1400 | state->rev = cx18_av_read4(cx, CXADEC_CHIP_CTRL) & 0xffff; |
1404 | state->id = ((state->rev >> 4) == CXADEC_CHIP_TYPE_MAKO) | 1401 | state->id = ((state->rev >> 4) == CXADEC_CHIP_TYPE_MAKO) |
@@ -1417,5 +1414,8 @@ int cx18_av_probe(struct cx18 *cx) | |||
1417 | snprintf(sd->name, sizeof(sd->name), | 1414 | snprintf(sd->name, sizeof(sd->name), |
1418 | "%s %03x", cx->v4l2_dev.name, (state->rev >> 4)); | 1415 | "%s %03x", cx->v4l2_dev.name, (state->rev >> 4)); |
1419 | sd->grp_id = CX18_HW_418_AV; | 1416 | sd->grp_id = CX18_HW_418_AV; |
1420 | return v4l2_device_register_subdev(&cx->v4l2_dev, sd); | 1417 | err = v4l2_device_register_subdev(&cx->v4l2_dev, sd); |
1418 | if (!err) | ||
1419 | cx18_av_init(cx); | ||
1420 | return err; | ||
1421 | } | 1421 | } |
diff --git a/drivers/media/video/cx18/cx18-driver.c b/drivers/media/video/cx18/cx18-driver.c index 1a67ad5daad3..7f65a47f12e1 100644 --- a/drivers/media/video/cx18/cx18-driver.c +++ b/drivers/media/video/cx18/cx18-driver.c | |||
@@ -912,7 +912,6 @@ static int __devinit cx18_probe(struct pci_dev *pci_dev, | |||
912 | CX18_ERR("Could not register A/V decoder subdevice\n"); | 912 | CX18_ERR("Could not register A/V decoder subdevice\n"); |
913 | goto free_map; | 913 | goto free_map; |
914 | } | 914 | } |
915 | cx18_call_hw(cx, CX18_HW_418_AV, core, init, 0); | ||
916 | 915 | ||
917 | /* Initialize GPIO Reset Controller to do chip resets during i2c init */ | 916 | /* Initialize GPIO Reset Controller to do chip resets during i2c init */ |
918 | if (cx->card->hw_all & CX18_HW_GPIO_RESET_CTRL) { | 917 | if (cx->card->hw_all & CX18_HW_GPIO_RESET_CTRL) { |