diff options
author | Ondrej Zary <linux@rainbow-software.org> | 2013-05-14 15:54:43 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2013-07-26 12:32:15 -0400 |
commit | 8fd79579c9ccc6ac98d02c2c97d5fb367cfc0e29 (patch) | |
tree | ad34ae1e284ee9ac765ce1841e13da62d2945f36 /sound | |
parent | b3ba8fa6b89bd99efe75080bfd8f3168781ae7de (diff) |
[media] tea575x-tuner: move HW init to a separate function
Move HW initialization to separate function to allow using the code without
the v4l parts. This is needed for use in the bttv driver.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/i2c/other/tea575x-tuner.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/sound/i2c/other/tea575x-tuner.c b/sound/i2c/other/tea575x-tuner.c index 8a36a1d9803f..46ec4dff094b 100644 --- a/sound/i2c/other/tea575x-tuner.c +++ b/sound/i2c/other/tea575x-tuner.c | |||
@@ -486,13 +486,9 @@ static const struct v4l2_ctrl_ops tea575x_ctrl_ops = { | |||
486 | .s_ctrl = tea575x_s_ctrl, | 486 | .s_ctrl = tea575x_s_ctrl, |
487 | }; | 487 | }; |
488 | 488 | ||
489 | /* | ||
490 | * initialize all the tea575x chips | ||
491 | */ | ||
492 | int snd_tea575x_init(struct snd_tea575x *tea, struct module *owner) | ||
493 | { | ||
494 | int retval; | ||
495 | 489 | ||
490 | int snd_tea575x_hw_init(struct snd_tea575x *tea) | ||
491 | { | ||
496 | tea->mute = true; | 492 | tea->mute = true; |
497 | 493 | ||
498 | /* Not all devices can or know how to read the data back. | 494 | /* Not all devices can or know how to read the data back. |
@@ -507,6 +503,17 @@ int snd_tea575x_init(struct snd_tea575x *tea, struct module *owner) | |||
507 | tea->freq = 90500 * 16; /* 90.5Mhz default */ | 503 | tea->freq = 90500 * 16; /* 90.5Mhz default */ |
508 | snd_tea575x_set_freq(tea); | 504 | snd_tea575x_set_freq(tea); |
509 | 505 | ||
506 | return 0; | ||
507 | } | ||
508 | EXPORT_SYMBOL(snd_tea575x_hw_init); | ||
509 | |||
510 | int snd_tea575x_init(struct snd_tea575x *tea, struct module *owner) | ||
511 | { | ||
512 | int retval = snd_tea575x_hw_init(tea); | ||
513 | |||
514 | if (retval) | ||
515 | return retval; | ||
516 | |||
510 | tea->vd = tea575x_radio; | 517 | tea->vd = tea575x_radio; |
511 | video_set_drvdata(&tea->vd, tea); | 518 | video_set_drvdata(&tea->vd, tea); |
512 | mutex_init(&tea->mutex); | 519 | mutex_init(&tea->mutex); |