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 <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
fb6d8e2c7f
commit
7972f9880c
@@ -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;
|
struct xc2028_data *priv;
|
||||||
void *video_dev;
|
void *video_dev;
|
||||||
|
@@ -48,14 +48,15 @@ struct xc2028_config {
|
|||||||
#define XC2028_RESET_CLK 1
|
#define XC2028_RESET_CLK 1
|
||||||
|
|
||||||
#if defined(CONFIG_TUNER_XC2028) || (defined(CONFIG_TUNER_XC2028_MODULE) && defined(MODULE))
|
#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
|
#else
|
||||||
void *xc2028_attach(struct dvb_frontend *fe,
|
static inline struct dvb_frontend *xc2028_attach(struct dvb_frontend *fe,
|
||||||
struct xc2028_config *cfg)
|
struct xc2028_config *cfg)
|
||||||
{
|
{
|
||||||
printk(KERN_INFO "%s: not probed - driver disabled by Kconfig\n",
|
printk(KERN_INFO "%s: not probed - driver disabled by Kconfig\n",
|
||||||
__FUNCTION__);
|
__FUNCTION__);
|
||||||
return -EINVAL;
|
return NULL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user