Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7972f9880c8c812332a56da7cfa4523d01ea310b
Commit:     7972f9880c8c812332a56da7cfa4523d01ea310b
Parent:     fb6d8e2c7fe1667d8ce057e333b18deb91191be5
Author:     Michael Krufky <[EMAIL PROTECTED]>
AuthorDate: Fri Dec 21 16:12:09 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Fri Jan 25 19:04:14 2008 -0200

    V4L/DVB (6893): tuner-xc2028: fix xc2028_attach function
    
    xc2028_attach was returning an integer when disabled from the build, where 
it
    should instead be returning NULL.  Declare xc2028_attach as type 
dvb_frontend *
    instead of void *.
    
    The prototype declaration must be marked as extern in the header.
    
    Signed-off-by: Michael Krufky <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/video/tuner-xc2028.c |    3 ++-
 drivers/media/video/tuner-xc2028.h |    9 +++++----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/media/video/tuner-xc2028.c 
b/drivers/media/video/tuner-xc2028.c
index 5ed12e2..ddd94f1 100644
--- a/drivers/media/video/tuner-xc2028.c
+++ b/drivers/media/video/tuner-xc2028.c
@@ -1140,7 +1140,8 @@ static const struct dvb_tuner_ops xc2028_dvb_tuner_ops = {
 
 };
 
-void *xc2028_attach(struct dvb_frontend *fe, struct xc2028_config *cfg)
+struct dvb_frontend *xc2028_attach(struct dvb_frontend *fe,
+                                  struct xc2028_config *cfg)
 {
        struct xc2028_data *priv;
        void               *video_dev;
diff --git a/drivers/media/video/tuner-xc2028.h 
b/drivers/media/video/tuner-xc2028.h
index 7462629..3eb8420 100644
--- a/drivers/media/video/tuner-xc2028.h
+++ b/drivers/media/video/tuner-xc2028.h
@@ -48,14 +48,15 @@ struct xc2028_config {
 #define XC2028_RESET_CLK       1
 
 #if defined(CONFIG_TUNER_XC2028) || (defined(CONFIG_TUNER_XC2028_MODULE) && 
defined(MODULE))
-void *xc2028_attach(struct dvb_frontend *fe, struct xc2028_config *cfg);
+extern struct dvb_frontend *xc2028_attach(struct dvb_frontend *fe,
+                                         struct xc2028_config *cfg);
 #else
-void *xc2028_attach(struct dvb_frontend *fe,
-                               struct xc2028_config *cfg)
+static inline struct dvb_frontend *xc2028_attach(struct dvb_frontend *fe,
+                                                struct xc2028_config *cfg)
 {
        printk(KERN_INFO "%s: not probed - driver disabled by Kconfig\n",
               __FUNCTION__);
-       return -EINVAL;
+       return NULL;
 }
 #endif
 
-
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