Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c5dec9fb authored by Trent Piepho's avatar Trent Piepho Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (4751): Fix DBV_FE_CUSTOMISE for card drivers compiled into kernel



When a front-end is disabled, card drivers that use it are compiled with
a stub version of the front-end's attach function.  This way they have no
references to the front-end's code and don't need it to be loaded.
If a card driver is compiled into the kernel, and a front-end is a
module, then that front-end is effectively disabled wrt the card driver. 
In this case, the card driver should get the stub version.  This was not
happening.
The stub vs real attach function selection is changed so that when the
front-end is a module the real attach function is only used if the card
driver is a module as well.  This means a module front-end will be
supported by card drivers that are modules and not supported by card
drivers compiled into the kernel.

Signed-off-by: default avatarTrent Piepho <xyzzy@speakeasy.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 9bb6e259
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ struct bcm3510_config
	int (*request_firmware)(struct dvb_frontend* fe, const struct firmware **fw, char* name);
};

#if defined(CONFIG_DVB_BCM3510) || defined(CONFIG_DVB_BCM3510_MODULE)
#if defined(CONFIG_DVB_BCM3510) || (defined(CONFIG_DVB_BCM3510_MODULE) && defined(MODULE))
extern struct dvb_frontend* bcm3510_attach(const struct bcm3510_config* config,
					   struct i2c_adapter* i2c);
#else
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ struct cx22700_config
	u8 demod_address;
};

#if defined(CONFIG_DVB_CX22700) || defined(CONFIG_DVB_CX22700_MODULE)
#if defined(CONFIG_DVB_CX22700) || (defined(CONFIG_DVB_CX22700_MODULE) && defined(MODULE))
extern struct dvb_frontend* cx22700_attach(const struct cx22700_config* config,
					   struct i2c_adapter* i2c);
#else
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ struct cx22702_config
	u8 output_mode;
};

#if defined(CONFIG_DVB_CX22702) || defined(CONFIG_DVB_CX22702_MODULE)
#if defined(CONFIG_DVB_CX22702) || (defined(CONFIG_DVB_CX22702_MODULE) && defined(MODULE))
extern struct dvb_frontend* cx22702_attach(const struct cx22702_config* config,
					   struct i2c_adapter* i2c);
#else
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ static inline int cx24110_pll_write(struct dvb_frontend *fe, u32 val) {
	return r;
}

#if defined(CONFIG_DVB_CX24110) || defined(CONFIG_DVB_CX24110_MODULE)
#if defined(CONFIG_DVB_CX24110) || (defined(CONFIG_DVB_CX24110_MODULE) && defined(MODULE))
extern struct dvb_frontend* cx24110_attach(const struct cx24110_config* config,
					   struct i2c_adapter* i2c);
#else
+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ struct cx24123_config
	int lnb_polarity;
};

#if defined(CONFIG_DVB_CX24123) || defined(CONFIG_DVB_CX24123_MODULE)
#if defined(CONFIG_DVB_CX24123) || (defined(CONFIG_DVB_CX24123_MODULE) && defined(MODULE))
extern struct dvb_frontend* cx24123_attach(const struct cx24123_config* config,
					   struct i2c_adapter* i2c);
#else
Loading