提交 0f838f8d 编写于 作者: M Michael Krufky 提交者: Mauro Carvalho Chehab

V4L/DVB (5758): Tea5767: store tuning operations in tuner_operations structure

Create static struct tuner_operations tea5767_tuner_ops for tea5767 
tuning function callback pointers
Signed-off-by: NMichael Krufky <mkrufky@linuxtv.org>
Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
上级 e407cd54
...@@ -343,6 +343,14 @@ int tea5767_autodetection(struct i2c_client *c) ...@@ -343,6 +343,14 @@ int tea5767_autodetection(struct i2c_client *c)
return 0; return 0;
} }
static struct tuner_operations tea5767_tuner_ops = {
.set_tv_freq = set_tv_freq,
.set_radio_freq = set_radio_freq,
.has_signal = tea5767_signal,
.is_stereo = tea5767_stereo,
.standby = tea5767_standby,
};
int tea5767_tuner_init(struct i2c_client *c) int tea5767_tuner_init(struct i2c_client *c)
{ {
struct tuner *t = i2c_get_clientdata(c); struct tuner *t = i2c_get_clientdata(c);
...@@ -350,11 +358,7 @@ int tea5767_tuner_init(struct i2c_client *c) ...@@ -350,11 +358,7 @@ int tea5767_tuner_init(struct i2c_client *c)
tuner_info("type set to %d (%s)\n", t->type, "Philips TEA5767HN FM Radio"); tuner_info("type set to %d (%s)\n", t->type, "Philips TEA5767HN FM Radio");
strlcpy(c->name, "tea5767", sizeof(c->name)); strlcpy(c->name, "tea5767", sizeof(c->name));
t->ops.set_tv_freq = set_tv_freq; memcpy(&t->ops, &tea5767_tuner_ops, sizeof(struct tuner_operations));
t->ops.set_radio_freq = set_radio_freq;
t->ops.has_signal = tea5767_signal;
t->ops.is_stereo = tea5767_stereo;
t->ops.standby = tea5767_standby;
return (0); return (0);
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册