summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/tuner-simple.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-06-07 09:30:59 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-06-07 09:30:59 -0300
commit8f4a89da9e9a760bc538ddec6687826007a1d04c (patch)
tree1eb144567bc6064f9f16bb72d13bb1270bb29141 /linux/drivers/media/video/tuner-simple.c
parent9aabc7e2945432ffb81a92e556b406bc93c3ef9a (diff)
parent0d79963da3174ac0a23ef4f8ae28f8b0ad30e636 (diff)
downloadmediapointer-dvb-s2-8f4a89da9e9a760bc538ddec6687826007a1d04c.tar.gz
mediapointer-dvb-s2-8f4a89da9e9a760bc538ddec6687826007a1d04c.tar.bz2
merge: http://linuxtv.org/hg/~mkrufky/tuner
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/tuner-simple.c')
-rw-r--r--linux/drivers/media/video/tuner-simple.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/linux/drivers/media/video/tuner-simple.c b/linux/drivers/media/video/tuner-simple.c
index a4718b2f0..8cac349fe 100644
--- a/linux/drivers/media/video/tuner-simple.c
+++ b/linux/drivers/media/video/tuner-simple.c
@@ -515,6 +515,13 @@ static void default_set_radio_freq(struct i2c_client *c, unsigned int freq)
tuner_warn("i2c i/o error: rc == %d (should be 4)\n",rc);
}
+static struct tuner_operations simple_tuner_ops = {
+ .set_tv_freq = default_set_tv_freq,
+ .set_radio_freq = default_set_radio_freq,
+ .has_signal = tuner_signal,
+ .is_stereo = tuner_stereo,
+};
+
int default_tuner_init(struct i2c_client *c)
{
struct tuner *t = i2c_get_clientdata(c);
@@ -523,11 +530,7 @@ int default_tuner_init(struct i2c_client *c)
t->type, tuners[t->type].name);
strlcpy(c->name, tuners[t->type].name, sizeof(c->name));
- t->set_tv_freq = default_set_tv_freq;
- t->set_radio_freq = default_set_radio_freq;
- t->has_signal = tuner_signal;
- t->is_stereo = tuner_stereo;
- t->standby = NULL;
+ memcpy(&t->ops, &simple_tuner_ops, sizeof(struct tuner_operations));
return 0;
}