Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f1c9a281005f714fdc57c830a23f2b6bd6e2b714
Commit:     f1c9a281005f714fdc57c830a23f2b6bd6e2b714
Parent:     daae58956bebeab6631ba078669970a27bdfbdbe
Author:     Michael Krufky <[EMAIL PROTECTED]>
AuthorDate: Sun Dec 16 19:27:23 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Fri Jan 25 19:03:53 2008 -0200

    V4L/DVB (6839): tuner: add set_config to struct analog_tuner_ops
    
    Signed-off-by: Michael Krufky <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/video/tuner-core.c   |   14 ++++++++++++++
 drivers/media/video/tuner-driver.h |    3 +++
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index 355f981..9134b99 100644
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -154,6 +154,19 @@ static int fe_has_signal(struct dvb_frontend *fe)
        return strength;
 }
 
+static int fe_set_config(struct dvb_frontend *fe, void *priv_cfg)
+{
+       struct dvb_tuner_ops *fe_tuner_ops = &fe->ops.tuner_ops;
+       struct tuner *t = fe->analog_demod_priv;
+
+       if (fe_tuner_ops->set_config)
+               return fe_tuner_ops->set_config(fe, priv_cfg);
+
+       tuner_warn("Tuner frontend module has no way to set config\n");
+
+       return 0;
+}
+
 static void tuner_status(struct dvb_frontend *fe);
 
 static struct analog_tuner_ops tuner_core_ops = {
@@ -161,6 +174,7 @@ static struct analog_tuner_ops tuner_core_ops = {
        .standby        = fe_standby,
        .release        = fe_release,
        .has_signal     = fe_has_signal,
+       .set_config     = fe_set_config,
        .tuner_status   = tuner_status
 };
 
diff --git a/drivers/media/video/tuner-driver.h 
b/drivers/media/video/tuner-driver.h
index 65ced43..7f43dc6 100644
--- a/drivers/media/video/tuner-driver.h
+++ b/drivers/media/video/tuner-driver.h
@@ -45,6 +45,9 @@ struct analog_tuner_ops {
        void (*standby)(struct dvb_frontend *fe);
        void (*release)(struct dvb_frontend *fe);
        int  (*i2c_gate_ctrl)(struct dvb_frontend *fe, int enable);
+
+       /** This is to allow setting tuner-specific configuration */
+       int (*set_config)(struct dvb_frontend *fe, void *priv_cfg);
 };
 
 struct tuner {
-
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