Skip to content

Commit

Permalink
V4L/DVB (5757): Tea5761: store tuning operations in tuner_operations …
Browse files Browse the repository at this point in the history
…structure

Create static struct tuner_operations tea5761_tuner_ops
for tea5761 tuning function callback pointers

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Michael Krufky authored and Mauro Carvalho Chehab committed Jul 18, 2007
1 parent 9af596e commit e407cd5
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions drivers/media/video/tea5761.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,13 @@ int tea5761_autodetection(struct i2c_client *c)
return 0;
}

static struct tuner_operations tea5761_tuner_ops = {
.set_tv_freq = set_tv_freq,
.set_radio_freq = set_radio_freq,
.has_signal = tea5761_signal,
.is_stereo = tea5761_stereo,
};

int tea5761_tuner_init(struct i2c_client *c)
{
struct tuner *t = i2c_get_clientdata(c);
Expand All @@ -229,10 +236,7 @@ int tea5761_tuner_init(struct i2c_client *c)
tuner_info("type set to %d (%s)\n", t->type, "Philips TEA5761HN FM Radio");
strlcpy(c->name, "tea5761", sizeof(c->name));

t->ops.set_tv_freq = set_tv_freq;
t->ops.set_radio_freq = set_radio_freq;
t->ops.has_signal = tea5761_signal;
t->ops.is_stereo = tea5761_stereo;
memcpy(&t->ops, &tea5761_tuner_ops, sizeof(struct tuner_operations));

return (0);
}

0 comments on commit e407cd5

Please sign in to comment.