Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=71a2ee37e8851f430d72daea0722908512d57f79
Commit:     71a2ee37e8851f430d72daea0722908512d57f79
Parent:     5add9a6f3c90680f89b4694e81025d2aed9559af
Author:     Mauro Carvalho Chehab <[EMAIL PROTECTED]>
AuthorDate: Thu Nov 22 12:19:37 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Fri Jan 25 19:02:39 2008 -0200

    V4L/DVB (6660): Allow fully configuring xc3028 during xc2028_attach
    
    xc3028 can be used on some DTV only designs (for example, DVB-S boards). 
Before
    this patch, a DTV only board would need to call set_tuner_config callback.
    
    This patch allows to optionally pass a xc3028_ctrl parameter, via 
xc3028_config
    struct, fully initializing the driver for DTV.
    
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/video/tuner-xc2028.c |    5 ++++-
 drivers/media/video/tuner-xc2028.h |    1 +
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/tuner-xc2028.c 
b/drivers/media/video/tuner-xc2028.c
index 6a6642e..c231e7a 100644
--- a/drivers/media/video/tuner-xc2028.c
+++ b/drivers/media/video/tuner-xc2028.c
@@ -1061,7 +1061,7 @@ void *xc2028_attach(struct dvb_frontend *fe, struct 
xc2028_config *cfg)
        if (debug)
                printk(KERN_DEBUG PREFIX ": Xcv2028/3028 init called!\n");
 
-       if (NULL == cfg->video_dev)
+       if (NULL == cfg || NULL == cfg->video_dev)
                return NULL;
 
        if (!fe) {
@@ -1106,6 +1106,9 @@ void *xc2028_attach(struct dvb_frontend *fe, struct 
xc2028_config *cfg)
 
        tuner_info("type set to %s\n", "XCeive xc2028/xc3028 tuner");
 
+       if (cfg->ctrl)
+               xc2028_set_config(fe, cfg->ctrl);
+
        mutex_unlock(&xc2028_list_mutex);
 
        return fe;
diff --git a/drivers/media/video/tuner-xc2028.h 
b/drivers/media/video/tuner-xc2028.h
index f24fb2a..a59d00f 100644
--- a/drivers/media/video/tuner-xc2028.h
+++ b/drivers/media/video/tuner-xc2028.h
@@ -23,6 +23,7 @@ struct xc2028_config {
        struct i2c_adapter *i2c_adap;
        u8                 i2c_addr;
        void               *video_dev;
+       struct xc2028_ctrl *ctrl;
        int                (*callback) (void *dev, int command, int arg);
 };
 
-
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