From 507449b0440221c834914389d808f4728dcd2702 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Sat, 6 Sep 2008 13:56:58 -0400 Subject: xc5000: dont pass devptr in xc5000_attach() From: Michael Krufky Dont pass devptr in xc5000_attach, dont store it in xc5000_priv. This pointer is passed into the tuner_callback function, which always expects a pointer to fe->dvb->priv or i2c_adapter->algo_data. This prevents future possible bugs in new drivers, such as using a "devptr" other that the standard fe->dvb->priv in a DVB driver. Priority: normal Signed-off-by: Michael Krufky --- linux/drivers/media/common/tuners/xc5000.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'linux/drivers/media/common/tuners/xc5000.h') diff --git a/linux/drivers/media/common/tuners/xc5000.h b/linux/drivers/media/common/tuners/xc5000.h index 5389f7409..fa0321cfd 100644 --- a/linux/drivers/media/common/tuners/xc5000.h +++ b/linux/drivers/media/common/tuners/xc5000.h @@ -49,13 +49,11 @@ struct xc5000_config { (defined(CONFIG_MEDIA_TUNER_XC5000_MODULE) && defined(MODULE)) extern struct dvb_frontend* xc5000_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, - struct xc5000_config *cfg, - void *devptr); + struct xc5000_config *cfg); #else static inline struct dvb_frontend* xc5000_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, - struct xc5000_config *cfg, - void *devptr) + struct xc5000_config *cfg) { printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); return NULL; -- cgit v1.2.3 From 9385e4874ef72f62d77800fe2eb47429d0854125 Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Fri, 12 Sep 2008 12:31:45 -0400 Subject: convert tuner drivers to use dvb_frontend->callback From: Michael Krufky Priority: normal Signed-off-by: Michael Krufky --- linux/drivers/media/common/tuners/xc5000.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'linux/drivers/media/common/tuners/xc5000.h') diff --git a/linux/drivers/media/common/tuners/xc5000.h b/linux/drivers/media/common/tuners/xc5000.h index fa0321cfd..cf1a558e0 100644 --- a/linux/drivers/media/common/tuners/xc5000.h +++ b/linux/drivers/media/common/tuners/xc5000.h @@ -30,8 +30,6 @@ struct i2c_adapter; struct xc5000_config { u8 i2c_address; u32 if_khz; - - int (*tuner_callback) (void *priv, int command, int arg); }; /* xc5000 callback command */ -- cgit v1.2.3