summaryrefslogtreecommitdiffstats
path: root/sound/i2c
diff options
context:
space:
mode:
authorOndrej Zary <linux@rainbow-software.org>2013-05-14 16:54:43 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2013-07-26 13:32:15 -0300
commit8fd79579c9ccc6ac98d02c2c97d5fb367cfc0e29 (patch)
treead34ae1e284ee9ac765ce1841e13da62d2945f36 /sound/i2c
parentb3ba8fa6b89bd99efe75080bfd8f3168781ae7de (diff)
downloadlinux-stable-8fd79579c9ccc6ac98d02c2c97d5fb367cfc0e29.tar.gz
linux-stable-8fd79579c9ccc6ac98d02c2c97d5fb367cfc0e29.tar.bz2
linux-stable-8fd79579c9ccc6ac98d02c2c97d5fb367cfc0e29.zip
[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/i2c')
-rw-r--r--sound/i2c/other/tea575x-tuner.c19
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 = {
.s_ctrl = tea575x_s_ctrl,
};
-/*
- * initialize all the tea575x chips
- */
-int snd_tea575x_init(struct snd_tea575x *tea, struct module *owner)
-{
- int retval;
+int snd_tea575x_hw_init(struct snd_tea575x *tea)
+{
tea->mute = true;
/* 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)
tea->freq = 90500 * 16; /* 90.5Mhz default */
snd_tea575x_set_freq(tea);
+ return 0;
+}
+EXPORT_SYMBOL(snd_tea575x_hw_init);
+
+int snd_tea575x_init(struct snd_tea575x *tea, struct module *owner)
+{
+ int retval = snd_tea575x_hw_init(tea);
+
+ if (retval)
+ return retval;
+
tea->vd = tea575x_radio;
video_set_drvdata(&tea->vd, tea);
mutex_init(&tea->mutex);