diff options
-rw-r--r-- | drivers/media/video/tuner-simple.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/media/video/tuner-simple.c b/drivers/media/video/tuner-simple.c index fb4addbd5eb6..fd23c1d8aa26 100644 --- a/drivers/media/video/tuner-simple.c +++ b/drivers/media/video/tuner-simple.c | |||
@@ -479,6 +479,13 @@ static void default_set_radio_freq(struct i2c_client *c, unsigned int freq) | |||
479 | tuner_warn("i2c i/o error: rc == %d (should be 4)\n",rc); | 479 | tuner_warn("i2c i/o error: rc == %d (should be 4)\n",rc); |
480 | } | 480 | } |
481 | 481 | ||
482 | static struct tuner_operations simple_tuner_ops = { | ||
483 | .set_tv_freq = default_set_tv_freq, | ||
484 | .set_radio_freq = default_set_radio_freq, | ||
485 | .has_signal = tuner_signal, | ||
486 | .is_stereo = tuner_stereo, | ||
487 | }; | ||
488 | |||
482 | int default_tuner_init(struct i2c_client *c) | 489 | int default_tuner_init(struct i2c_client *c) |
483 | { | 490 | { |
484 | struct tuner *t = i2c_get_clientdata(c); | 491 | struct tuner *t = i2c_get_clientdata(c); |
@@ -487,11 +494,7 @@ int default_tuner_init(struct i2c_client *c) | |||
487 | t->type, tuners[t->type].name); | 494 | t->type, tuners[t->type].name); |
488 | strlcpy(c->name, tuners[t->type].name, sizeof(c->name)); | 495 | strlcpy(c->name, tuners[t->type].name, sizeof(c->name)); |
489 | 496 | ||
490 | t->ops.set_tv_freq = default_set_tv_freq; | 497 | memcpy(&t->ops, &simple_tuner_ops, sizeof(struct tuner_operations)); |
491 | t->ops.set_radio_freq = default_set_radio_freq; | ||
492 | t->ops.has_signal = tuner_signal; | ||
493 | t->ops.is_stereo = tuner_stereo; | ||
494 | t->ops.standby = NULL; | ||
495 | 498 | ||
496 | return 0; | 499 | return 0; |
497 | } | 500 | } |