Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5d807c9fc3fe8a88f1bb95a54da11cebed1612a6
Commit:     5d807c9fc3fe8a88f1bb95a54da11cebed1612a6
Parent:     0f838f8d02415a25358850cc32d36cd72c2a798b
Author:     Michael Krufky <[EMAIL PROTECTED]>
AuthorDate: Wed Jun 6 16:17:57 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Wed Jul 18 14:24:06 2007 -0300

    V4L/DVB (5759): Tuner-simple: store tuning operations in tuner_operations 
struct
    
    Create static struct tuner_operations simple_tuner_ops
    for tuner-simple tuning function callback pointers
    
    Signed-off-by: Michael Krufky <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 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 fb4addb..fd23c1d 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)
                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);
@@ -487,11 +494,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->ops.set_tv_freq = default_set_tv_freq;
-       t->ops.set_radio_freq = default_set_radio_freq;
-       t->ops.has_signal = tuner_signal;
-       t->ops.is_stereo = tuner_stereo;
-       t->ops.standby = NULL;
+       memcpy(&t->ops, &simple_tuner_ops, sizeof(struct tuner_operations));
 
        return 0;
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to