Commit 102a342b authored by Andrew de Quincey's avatar Andrew de Quincey Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (4387): Add Kconfig infrastructure for dvb_attach



Allow it to be en/disabled
Disable it in < 2.6.17 due to symbol_xxx() bug

Signed-off-by: default avatarAndrew de Quincey <adq_dvb@lidskialf.net>
Acked-by: default avatarMichael Krufky <mkrufky@linuxtv.org>
Acked-by: default avatarTrent Piepho <xyzzy@speakeasy.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 2bfe031d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1716,8 +1716,10 @@ static void dst_release(struct dvb_frontend *fe)
{
	struct dst_state *state = fe->demodulator_priv;

#ifdef CONFIG_DVB_CORE_ATTACH
	if (state->dst_hw_cap & DST_TYPE_HAS_CA)
		symbol_put(dst_ca_attach);
#endif

	kfree(state);
}
+11 −0
Original line number Diff line number Diff line
@@ -9,3 +9,14 @@ config DVB_CORE
	  in-kernel drivers will select this automatically if needed.
	  If unsure say N.

config DVB_CORE_ATTACH
	bool "Load and attach frontend modules as needed"
	depends on DVB_CORE
	depends on MODULES
	help
	  Remove the static dependency of DVB card drivers on all
	  frontend modules for all possible card variants. Instead,
	  allow the card drivers to only load the frontend modules
	  they require. This saves several KBytes of memory.

	  If unsure say Y.
+6 −6
Original line number Diff line number Diff line
@@ -86,10 +86,10 @@ config DVB_USB_UMT_010
config DVB_USB_CXUSB
	tristate "Conexant USB2.0 hybrid reference design support"
	depends on DVB_USB
	select DVB_CX22702
	select DVB_LGDT330X
	select DVB_MT352
	select DVB_ZL10353
	select DVB_CX22702 if !DVB_FE_CUSTOMISE
	select DVB_LGDT330X if !DVB_FE_CUSTOMISE
	select DVB_MT352 if !DVB_FE_CUSTOMISE
	select DVB_ZL10353 if !DVB_FE_CUSTOMISE
	help
	  Say Y here to support the Conexant USB2.0 hybrid reference design.
	  Currently, only DVB and ATSC modes are supported, analog mode
@@ -101,8 +101,8 @@ config DVB_USB_CXUSB
config DVB_USB_DIGITV
	tristate "Nebula Electronics uDigiTV DVB-T USB2.0 support"
	depends on DVB_USB
	select DVB_NXT6000
	select DVB_MT352
	select DVB_NXT6000 if !DVB_FE_CUSTOMISE
	select DVB_MT352 if !DVB_FE_CUSTOMISE
	help
	  Say Y here to support the Nebula Electronics uDigitV USB2.0 DVB-T receiver.

+9 −0
Original line number Diff line number Diff line
@@ -34,7 +34,16 @@ 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)
extern struct dvb_frontend* bcm3510_attach(const struct bcm3510_config* config,
					   struct i2c_adapter* i2c);
#else
static inline struct dvb_frontend* bcm3510_attach(const struct bcm3510_config* config,
						  struct i2c_adapter* i2c)
{
	printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __FUNCTION__);
	return NULL;
}
#endif // CONFIG_DVB_BCM3510

#endif
+9 −0
Original line number Diff line number Diff line
@@ -31,7 +31,16 @@ struct cx22700_config
	u8 demod_address;
};

#if defined(CONFIG_DVB_CX22700) || defined(CONFIG_DVB_CX22700_MODULE)
extern struct dvb_frontend* cx22700_attach(const struct cx22700_config* config,
					   struct i2c_adapter* i2c);
#else
static inline struct dvb_frontend* cx22700_attach(const struct cx22700_config* config,
					   struct i2c_adapter* i2c)
{
	printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __FUNCTION__);
	return NULL;
}
#endif // CONFIG_DVB_CX22700

#endif // CX22700_H
Loading