[linux-dvb] semi-recent regressions in automatic loading of DVB modules

Lincoln Dale ltd at interlink.com.au
Thu Sep 7 08:51:32 CEST 2006


> > but - as far as i can tell, modprobe will be called to install
> > mt352_attach  - which obviously isn't the same thing as mt352.
> > maybe this is an area where the age of my module-init-tools is showing.
> > (see below).
> 
> Pretty much thats it yeah.
> 
> I've just downgraded my system to module-init-tools 3.1, and now
> dvb_attach
> fails as yours does, so it needs 3.2 at least... I'll add a comment to the
> Kconfig description about it.

as an alternative, the following patch works around it (if you don't
consider it too ugly).
this means many folks won't need to upgrade to a recent module-init-tools (i
don't think too many distributions are on 3.2 -- or more correctly, many
folks don't update their distributions too frequently).

this fixes the DvICO card auto-loading mt352 for me, but doesn't yet fix my
other 2 cards - neither dst nor dvb-bt8xx get loaded automatically.
i'll look into those now.


(if my mailer mangles the patch, i've also put it at
<http://www.interlink.com.au/ltd/dvb_mod_load_by_name.patch>)

--
From: Lincoln Dale <ltd at interlink.com.au>

[PATCH] enable dynamic module loading for frontend drivers with
module-init-tools 3.1

Enables dynamic loading of dvb frontend drivers through calling
request_module with the actual module name rather than just the symbol we
are looking for.

Signed-off-by: Lincoln Dale <ltd at interlink.com.au>
---
diff -ur orig/linux/drivers/media/dvb/dvb-core/dvbdev.h
new/linux/drivers/media/dvb/dvb-core/dvbdev.h
--- orig/linux/drivers/media/dvb/dvb-core/dvbdev.h	2006-09-06
21:00:04.000000000 +1000
+++ new/linux/drivers/media/dvb/dvb-core/dvbdev.h	2006-09-07
16:28:38.000000000 +1000
@@ -105,21 +105,21 @@
 
 /** generic DVB attach function. */
 #ifdef CONFIG_DVB_CORE_ATTACH
-#define dvb_attach(FUNCTION, ARGS...) ({ \
+#define dvb_attach(MODNAME, FUNCTION, ARGS...) ({ \
 	void *__r = NULL; \
-	typeof(&FUNCTION) __a = symbol_request(FUNCTION); \
+	typeof(&FUNCTION) __a =
try_then_request_module(symbol_get(FUNCTION),MODNAME); \
 	if (__a) { \
 		__r = (void *) __a(ARGS); \
 		if (__r == NULL) \
 			symbol_put(FUNCTION); \
 	} else { \
-		printk(KERN_ERR "DVB: Unable to find symbol
"#FUNCTION"()\n"); \
+		printk(KERN_ERR "DVB: Unable to find symbol "#FUNCTION"()
via module %s)\n",MODNAME); \
 	} \
 	__r; \
 })
 
 #else
-#define dvb_attach(FUNCTION, ARGS...) ({ \
+#define dvb_attach(MODNAME, FUNCTION, ARGS...) ({ \
 	FUNCTION(ARGS); \
 })
 
diff -ur orig/linux/drivers/media/dvb/b2c2/flexcop-fe-tuner.c
new/linux/drivers/media/dvb/b2c2/flexcop-fe-tuner.c
--- orig/linux/drivers/media/dvb/b2c2/flexcop-fe-tuner.c	2006-09-06
21:00:04.000000000 +1000
+++ new/linux/drivers/media/dvb/b2c2/flexcop-fe-tuner.c	2006-09-07
15:47:27.000000000 +1000
@@ -516,7 +516,7 @@
 	struct dvb_frontend_ops *ops;
 
 	/* try the sky v2.6 (stv0299/Samsung tbmu24112(sl1935)) */
-	if ((fc->fe = dvb_attach(stv0299_attach, &samsung_tbmu24112_config,
&fc->i2c_adap)) != NULL) {
+	if ((fc->fe = dvb_attach("stv0299", stv0299_attach,
&samsung_tbmu24112_config, &fc->i2c_adap)) != NULL) {
 		ops = &fc->fe->ops;
 
 		ops->tuner_ops.set_params =
samsung_tbmu24112_tuner_set_params;
@@ -530,40 +530,40 @@
 		info("found the stv0299 at i2c address:
0x%02x",samsung_tbmu24112_config.demod_address);
 	} else
 	/* try the air dvb-t (mt352/Samsung tdtc9251dh0(??)) */
-	if ((fc->fe = dvb_attach(mt352_attach, &samsung_tdtc9251dh0_config,
&fc->i2c_adap)) != NULL ) {
+	if ((fc->fe = dvb_attach("mt352", mt352_attach,
&samsung_tdtc9251dh0_config, &fc->i2c_adap)) != NULL ) {
 		fc->dev_type          = FC_AIR_DVB;
 		fc->fe->ops.tuner_ops.calc_regs =
samsung_tdtc9251dh0_calc_regs;
 		info("found the mt352 at i2c address:
0x%02x",samsung_tdtc9251dh0_config.demod_address);
 	} else
 	/* try the air atsc 2nd generation (nxt2002) */
-	if ((fc->fe = dvb_attach(nxt200x_attach, &samsung_tbmv_config,
&fc->i2c_adap)) != NULL) {
+	if ((fc->fe = dvb_attach("nxt200x", nxt200x_attach,
&samsung_tbmv_config, &fc->i2c_adap)) != NULL) {
 		fc->dev_type          = FC_AIR_ATSC2;
-		dvb_attach(dvb_pll_attach, fc->fe, 0x61, NULL,
&dvb_pll_samsung_tbmv);
+		dvb_attach("dvb_pll", dvb_pll_attach, fc->fe, 0x61, NULL,
&dvb_pll_samsung_tbmv);
 		info("found the nxt2002 at i2c address:
0x%02x",samsung_tbmv_config.demod_address);
 	} else
 	/* try the air atsc 3nd generation (lgdt3303) */
-	if ((fc->fe = dvb_attach(lgdt330x_attach,
&air2pc_atsc_hd5000_config, &fc->i2c_adap)) != NULL) {
+	if ((fc->fe = dvb_attach("lgdt330x", lgdt330x_attach,
&air2pc_atsc_hd5000_config, &fc->i2c_adap)) != NULL) {
 		fc->dev_type          = FC_AIR_ATSC3;
 		fc->fe->ops.tuner_ops.set_params =
lgdt3303_tuner_set_params;
 		info("found the lgdt3303 at i2c address:
0x%02x",air2pc_atsc_hd5000_config.demod_address);
 	} else
 	/* try the air atsc 1nd generation (bcm3510)/panasonic ct10s */
-	if ((fc->fe = dvb_attach(bcm3510_attach,
&air2pc_atsc_first_gen_config, &fc->i2c_adap)) != NULL) {
+	if ((fc->fe = dvb_attach("lgdt330x", bcm3510_attach,
&air2pc_atsc_first_gen_config, &fc->i2c_adap)) != NULL) {
 		fc->dev_type          = FC_AIR_ATSC1;
 		info("found the bcm3510 at i2c address:
0x%02x",air2pc_atsc_first_gen_config.demod_address);
 	} else
 	/* try the cable dvb (stv0297) */
 #ifdef STV0297_CS2
-	if ((fc->fe = dvb_attach(stv0297_cs2_attach,
&alps_tdee4_stv0297_config, &fc->i2c_adap)) != NULL) {
+	if ((fc->fe = dvb_attach("stv0297", stv0297_cs2_attach,
&alps_tdee4_stv0297_config, &fc->i2c_adap)) != NULL) {
 #else
-	if ((fc->fe = dvb_attach(stv0297_attach, &alps_tdee4_stv0297_config,
&fc->i2c_adap)) != NULL) {
+	if ((fc->fe = dvb_attach("stv0297", stv0297_attach,
&alps_tdee4_stv0297_config, &fc->i2c_adap)) != NULL) {
 #endif
 		fc->dev_type                        = FC_CABLE;
 		fc->fe->ops.tuner_ops.set_params =
alps_tdee4_stv0297_tuner_set_params;
 		info("found the stv0297 at i2c address:
0x%02x",alps_tdee4_stv0297_config.demod_address);
 	} else
 	/* try the sky v2.3 (vp310/Samsung tbdu18132(tsa5059)) */
-	if ((fc->fe = dvb_attach(vp310_mt312_attach,
&skystar23_samsung_tbdu18132_config, &fc->i2c_adap)) != NULL) {
+	if ((fc->fe = dvb_attach("mt312", vp310_mt312_attach,
&skystar23_samsung_tbdu18132_config, &fc->i2c_adap)) != NULL) {
 		ops = &fc->fe->ops;
 
 		ops->tuner_ops.set_params =
skystar23_samsung_tbdu18132_tuner_set_params;
diff -ur orig/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c
new/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c
--- orig/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c	2006-09-06
21:00:04.000000000 +1000
+++ new/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c	2006-09-07
15:39:42.000000000 +1000
@@ -600,10 +600,10 @@
 
 	switch(type) {
 	case BTTV_BOARD_DVICO_DVBT_LITE:
-		card->fe = dvb_attach(mt352_attach, &thomson_dtt7579_config,
card->i2c_adapter);
+		card->fe = dvb_attach("mt352", mt352_attach,
&thomson_dtt7579_config, card->i2c_adapter);
 
 		if (card->fe == NULL)
-			card->fe = dvb_attach(zl10353_attach,
&thomson_dtt7579_zl10353_config,
+			card->fe = dvb_attach("zl10353", zl10353_attach,
&thomson_dtt7579_zl10353_config,
 						  card->i2c_adapter);
 
 		if (card->fe != NULL) {
@@ -615,7 +615,7 @@
 
 	case BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE:
 		lgdt330x_reset(card);
-		card->fe = dvb_attach(lgdt330x_attach, &tdvs_tua6034_config,
card->i2c_adapter);
+		card->fe = dvb_attach("lgdt330x", lgdt330x_attach,
&tdvs_tua6034_config, card->i2c_adapter);
 		if (card->fe != NULL) {
 			card->fe->ops.tuner_ops.set_params =
tdvs_tua6034_tuner_set_params;
 			dprintk ("dvb_bt8xx: lgdt330x detected\n");
@@ -630,7 +630,7 @@
 
 		/* Old Nebula (marked (c)2003 on high profile pci card) has
nxt6000 demod */
 		digitv_alps_tded4_reset(card);
-		card->fe = dvb_attach(nxt6000_attach,
&vp3021_alps_tded4_config, card->i2c_adapter);
+		card->fe = dvb_attach("nxt6000", nxt6000_attach,
&vp3021_alps_tded4_config, card->i2c_adapter);
 		if (card->fe != NULL) {
 			card->fe->ops.tuner_ops.set_params =
vp3021_alps_tded4_tuner_set_params;
 			dprintk ("dvb_bt8xx: an nxt6000 was detected on your
digitv card\n");
@@ -639,7 +639,7 @@
 
 		/* New Nebula (marked (c)2005 on low profile pci card) has
mt352 demod */
 		digitv_alps_tded4_reset(card);
-		card->fe = dvb_attach(mt352_attach,
&digitv_alps_tded4_config, card->i2c_adapter);
+		card->fe = dvb_attach("mt352", mt352_attach,
&digitv_alps_tded4_config, card->i2c_adapter);
 
 		if (card->fe != NULL) {
 			card->fe->ops.tuner_ops.calc_regs =
digitv_alps_tded4_tuner_calc_regs;
@@ -648,14 +648,14 @@
 		break;
 
 	case BTTV_BOARD_AVDVBT_761:
-		card->fe = dvb_attach(sp887x_attach,
&microtune_mt7202dtf_config, card->i2c_adapter);
+		card->fe = dvb_attach("sp887x", sp887x_attach,
&microtune_mt7202dtf_config, card->i2c_adapter);
 		if (card->fe) {
 			card->fe->ops.tuner_ops.set_params =
microtune_mt7202dtf_tuner_set_params;
 		}
 		break;
 
 	case BTTV_BOARD_AVDVBT_771:
-		card->fe = dvb_attach(mt352_attach,
&advbt771_samsung_tdtc9251dh0_config, card->i2c_adapter);
+		card->fe = dvb_attach("mt352", mt352_attach,
&advbt771_samsung_tdtc9251dh0_config, card->i2c_adapter);
 		if (card->fe != NULL) {
 			card->fe->ops.tuner_ops.calc_regs =
advbt771_samsung_tdtc9251dh0_tuner_calc_regs;
 			card->fe->ops.info.frequency_min = 174000000;
@@ -672,7 +672,7 @@
 		state->bt = card->bt;
 		state->dst_ca = NULL;
 		/*	DST is not a frontend, attaching the ASIC	*/
-		if (dvb_attach(dst_attach, state, &card->dvb_adapter) ==
NULL) {
+		if (dvb_attach("dst", dst_attach, state, &card->dvb_adapter)
== NULL) {
 			printk("%s: Could not find a Twinhan DST.\n",
__FUNCTION__);
 			break;
 		}
@@ -680,11 +680,11 @@
 		/*	Conditional Access device			*/
 		card->fe = &state->frontend;
 		if (state->dst_hw_cap & DST_TYPE_HAS_CA)
-			dvb_attach(dst_ca_attach, state,
&card->dvb_adapter);
+			dvb_attach("dst_ca", dst_ca_attach, state,
&card->dvb_adapter);
 		break;
 
 	case BTTV_BOARD_PINNACLESAT:
-		card->fe = dvb_attach(cx24110_attach, &pctvsat_config,
card->i2c_adapter);
+		card->fe = dvb_attach("cx24110", cx24110_attach,
&pctvsat_config, card->i2c_adapter);
 		if (card->fe) {
 			card->fe->ops.tuner_ops.init = pinnsat_tuner_init;
 			card->fe->ops.tuner_ops.sleep = pinnsat_tuner_sleep;
@@ -693,7 +693,7 @@
 		break;
 
 	case BTTV_BOARD_PC_HDTV:
-		card->fe = dvb_attach(or51211_attach, &or51211_config,
card->i2c_adapter);
+		card->fe = dvb_attach("or51211", or51211_attach,
&or51211_config, card->i2c_adapter);
 		break;
 	}
 
diff -ur orig/linux/drivers/media/dvb/dvb-usb/cxusb.c
new/linux/drivers/media/dvb/dvb-usb/cxusb.c
--- orig/linux/drivers/media/dvb/dvb-usb/cxusb.c	2006-09-06
21:00:04.000000000 +1000
+++ new/linux/drivers/media/dvb/dvb-usb/cxusb.c	2006-09-07
15:48:19.000000000 +1000
@@ -410,7 +410,7 @@
 
 	cxusb_ctrl_msg(d,CMD_DIGITAL, NULL, 0, &b, 1);
 
-	if ((d->fe = dvb_attach(cx22702_attach, &cxusb_cx22702_config,
&d->i2c_adap)) != NULL)
+	if ((d->fe = dvb_attach("cx22702", cx22702_attach,
&cxusb_cx22702_config, &d->i2c_adap)) != NULL)
 		return 0;
 
 	return -EIO;
@@ -423,7 +423,7 @@
 
 	cxusb_ctrl_msg(d,CMD_DIGITAL, NULL, 0, NULL, 0);
 
-	if ((d->fe = dvb_attach(lgdt330x_attach, &cxusb_lgdt3303_config,
&d->i2c_adap)) != NULL)
+	if ((d->fe = dvb_attach("lgdt330x", lgdt330x_attach,
&cxusb_lgdt3303_config, &d->i2c_adap)) != NULL)
 		return 0;
 
 	return -EIO;
@@ -436,7 +436,7 @@
 
 	cxusb_ctrl_msg(d,CMD_DIGITAL, NULL, 0, NULL, 0);
 
-	if ((d->fe = dvb_attach(mt352_attach, &cxusb_mt352_config,
&d->i2c_adap)) != NULL)
+	if ((d->fe = dvb_attach("mt352", mt352_attach, &cxusb_mt352_config,
&d->i2c_adap)) != NULL)
 		return 0;
 
 	return -EIO;
@@ -449,8 +449,8 @@
 
 	cxusb_ctrl_msg(d,CMD_DIGITAL, NULL, 0, NULL, 0);
 
-	if (((d->fe = dvb_attach(mt352_attach, &cxusb_dee1601_config,
&d->i2c_adap)) != NULL) ||
-		((d->fe = dvb_attach(zl10353_attach,
&cxusb_zl10353_dee1601_config, &d->i2c_adap)) != NULL))
+	if (((d->fe = dvb_attach("mt352", mt352_attach,
&cxusb_dee1601_config, &d->i2c_adap)) != NULL) ||
+		((d->fe = dvb_attach("zl10353", zl10353_attach,
&cxusb_zl10353_dee1601_config, &d->i2c_adap)) != NULL))
 		return 0;
 
 	return -EIO;
diff -ur orig/linux/drivers/media/dvb/dvb-usb/digitv.c
new/linux/drivers/media/dvb/dvb-usb/digitv.c
--- orig/linux/drivers/media/dvb/dvb-usb/digitv.c	2006-09-06
21:00:04.000000000 +1000
+++ new/linux/drivers/media/dvb/dvb-usb/digitv.c	2006-09-07
15:47:49.000000000 +1000
@@ -128,11 +128,11 @@
 
 static int digitv_frontend_attach(struct dvb_usb_device *d)
 {
-	if ((d->fe = dvb_attach(mt352_attach, &digitv_mt352_config,
&d->i2c_adap)) != NULL) {
+	if ((d->fe = dvb_attach("mt352", mt352_attach, &digitv_mt352_config,
&d->i2c_adap)) != NULL) {
 		d->fe->ops.tuner_ops.calc_regs = dvb_usb_tuner_calc_regs;
 		return 0;
 	}
-	if ((d->fe = dvb_attach(nxt6000_attach, &digitv_nxt6000_config,
&d->i2c_adap)) != NULL) {
+	if ((d->fe = dvb_attach("nxt6000", nxt6000_attach,
&digitv_nxt6000_config, &d->i2c_adap)) != NULL) {
 		d->fe->ops.tuner_ops.set_params =
digitv_nxt6000_tuner_set_params;
 		return 0;
 	}
diff -ur orig/linux/drivers/media/dvb/dvb-usb/umt-010.c
new/linux/drivers/media/dvb/dvb-usb/umt-010.c
--- orig/linux/drivers/media/dvb/dvb-usb/umt-010.c	2006-09-06
21:00:04.000000000 +1000
+++ new/linux/drivers/media/dvb/dvb-usb/umt-010.c	2006-09-07
15:47:37.000000000 +1000
@@ -58,7 +58,7 @@
 	umt_config.demod_init = umt_mt352_demod_init;
 	umt_config.demod_address = 0xf;
 
-	d->fe = dvb_attach(mt352_attach, &umt_config, &d->i2c_adap);
+	d->fe = dvb_attach("mt352", mt352_attach, &umt_config,
&d->i2c_adap);
 
 	return 0;
 }
diff -ur orig/linux/drivers/media/dvb/ttpci/av7110.c
new/linux/drivers/media/dvb/ttpci/av7110.c
--- orig/linux/drivers/media/dvb/ttpci/av7110.c	2006-09-06
21:00:04.000000000 +1000
+++ new/linux/drivers/media/dvb/ttpci/av7110.c	2006-09-07
15:42:09.000000000 +1000
@@ -2079,7 +2079,7 @@
 	if (av7110->dev->pci->subsystem_vendor == 0x110a) {
 		switch(av7110->dev->pci->subsystem_device) {
 		case 0x0000: // Fujitsu/Siemens DVB-Cable (ves1820/Philips
CD1516(??))
-			av7110->fe = dvb_attach(ves1820_attach,
&philips_cd1516_config,
+			av7110->fe = dvb_attach("ves1820", ves1820_attach,
&philips_cd1516_config,
 						    &av7110->i2c_adap,
read_pwm(av7110));
 			if (av7110->fe) {
 				av7110->fe->ops.tuner_ops.set_params =
philips_cd1516_tuner_set_params;
@@ -2094,7 +2094,7 @@
 		case 0x1002: // Hauppauge/TT WinTV DVB-S rev1.3SE
 
 			// try the ALPS BSRV2 first of all
-			av7110->fe = dvb_attach(ves1x93_attach,
&alps_bsrv2_config, &av7110->i2c_adap);
+			av7110->fe = dvb_attach("ves1x93", ves1x93_attach,
&alps_bsrv2_config, &av7110->i2c_adap);
 			if (av7110->fe) {
 				av7110->fe->ops.tuner_ops.set_params =
alps_bsrv2_tuner_set_params;
 				av7110->fe->ops.diseqc_send_master_cmd =
av7110_diseqc_send_master_cmd;
@@ -2105,7 +2105,7 @@
 			}
 
 			// try the ALPS BSRU6 now
-			av7110->fe = dvb_attach(stv0299_attach,
&alps_bsru6_config, &av7110->i2c_adap);
+			av7110->fe = dvb_attach("stv0299", stv0299_attach,
&alps_bsru6_config, &av7110->i2c_adap);
 			if (av7110->fe) {
 				av7110->fe->ops.tuner_ops.set_params =
alps_bsru6_tuner_set_params;
 				av7110->fe->tuner_priv = &av7110->i2c_adap;
@@ -2118,7 +2118,7 @@
 			}
 
 			// Try the grundig 29504-451
-			av7110->fe = dvb_attach(tda8083_attach,
&grundig_29504_451_config, &av7110->i2c_adap);
+			av7110->fe = dvb_attach("tda5083", tda8083_attach,
&grundig_29504_451_config, &av7110->i2c_adap);
 			if (av7110->fe) {
 				av7110->fe->ops.tuner_ops.set_params =
grundig_29504_451_tuner_set_params;
 				av7110->fe->ops.diseqc_send_master_cmd =
av7110_diseqc_send_master_cmd;
@@ -2132,7 +2132,7 @@
 			switch(av7110->dev->pci->subsystem_device) {
 			case 0x0000:
 				/* Siemens DVB-C (full-length card)
VES1820/Philips CD1516 */
-				av7110->fe = dvb_attach(ves1820_attach,
&philips_cd1516_config, &av7110->i2c_adap,
+				av7110->fe = dvb_attach("ves1820",
ves1820_attach, &philips_cd1516_config, &av7110->i2c_adap,
 							read_pwm(av7110));
 				if (av7110->fe) {
 					av7110->fe->ops.tuner_ops.set_params
= philips_cd1516_tuner_set_params;
@@ -2140,7 +2140,7 @@
 				break;
 			case 0x0003:
 				/* Hauppauge DVB-C 2.1 VES1820/ALPS TDBE2 */
-				av7110->fe = dvb_attach(ves1820_attach,
&alps_tdbe2_config, &av7110->i2c_adap,
+				av7110->fe = dvb_attach("ves1820",
ves1820_attach, &alps_tdbe2_config, &av7110->i2c_adap,
 							read_pwm(av7110));
 				if (av7110->fe) {
 					av7110->fe->ops.tuner_ops.set_params
= alps_tdbe2_tuner_set_params;
@@ -2151,7 +2151,7 @@
 
 		case 0x0001: // Hauppauge/TT Nexus-T premium rev1.X
 			// try ALPS TDLB7 first, then Grundig 29504-401
-			av7110->fe = dvb_attach(sp8870_attach,
&alps_tdlb7_config, &av7110->i2c_adap);
+			av7110->fe = dvb_attach("sp8870", sp8870_attach,
&alps_tdlb7_config, &av7110->i2c_adap);
 			if (av7110->fe) {
 				av7110->fe->ops.tuner_ops.set_params =
alps_tdlb7_tuner_set_params;
 				break;
@@ -2160,14 +2160,14 @@
 
 		case 0x0008: // Hauppauge/TT DVB-T
 			// Grundig 29504-401
-			av7110->fe = dvb_attach(l64781_attach,
&grundig_29504_401_config, &av7110->i2c_adap);
+			av7110->fe = dvb_attach("l64781", l64781_attach,
&grundig_29504_401_config, &av7110->i2c_adap);
 			if (av7110->fe)
 				av7110->fe->ops.tuner_ops.set_params =
grundig_29504_401_tuner_set_params;
 			break;
 
 		case 0x0002: // Hauppauge/TT DVB-C premium rev2.X
 
-			av7110->fe = dvb_attach(ves1820_attach,
&alps_tdbe2_config, &av7110->i2c_adap, read_pwm(av7110));
+			av7110->fe = dvb_attach("ves1820", ves1820_attach,
&alps_tdbe2_config, &av7110->i2c_adap, read_pwm(av7110));
 			if (av7110->fe) {
 				av7110->fe->ops.tuner_ops.set_params =
alps_tdbe2_tuner_set_params;
 			}
@@ -2175,7 +2175,7 @@
 
 		case 0x0004: // Galaxis DVB-S rev1.3
 			/* ALPS BSRV2 */
-			av7110->fe = dvb_attach(ves1x93_attach,
&alps_bsrv2_config, &av7110->i2c_adap);
+			av7110->fe = dvb_attach("ves1x93", ves1x93_attach,
&alps_bsrv2_config, &av7110->i2c_adap);
 			if (av7110->fe) {
 				av7110->fe->ops.tuner_ops.set_params =
alps_bsrv2_tuner_set_params;
 				av7110->fe->ops.diseqc_send_master_cmd =
av7110_diseqc_send_master_cmd;
@@ -2187,7 +2187,7 @@
 
 		case 0x0006: /* Fujitsu-Siemens DVB-S rev 1.6 */
 			/* Grundig 29504-451 */
-			av7110->fe = dvb_attach(tda8083_attach,
&grundig_29504_451_config, &av7110->i2c_adap);
+			av7110->fe = dvb_attach("tda8083", tda8083_attach,
&grundig_29504_451_config, &av7110->i2c_adap);
 			if (av7110->fe) {
 				av7110->fe->ops.tuner_ops.set_params =
grundig_29504_451_tuner_set_params;
 				av7110->fe->ops.diseqc_send_master_cmd =
av7110_diseqc_send_master_cmd;
@@ -2199,7 +2199,7 @@
 
 		case 0x000A: // Hauppauge/TT Nexus-CA rev1.X
 
-			av7110->fe = dvb_attach(stv0297_attach,
&nexusca_stv0297_config, &av7110->i2c_adap);
+			av7110->fe = dvb_attach("stv0297", stv0297_attach,
&nexusca_stv0297_config, &av7110->i2c_adap);
 			if (av7110->fe) {
 				av7110->fe->ops.tuner_ops.set_params =
nexusca_stv0297_tuner_set_params;
 
@@ -2215,12 +2215,12 @@
 
 		case 0x000E: /* Hauppauge/TT Nexus-S rev 2.3 */
 			/* ALPS BSBE1 */
-			av7110->fe = dvb_attach(stv0299_attach,
&alps_bsbe1_config, &av7110->i2c_adap);
+			av7110->fe = dvb_attach("stv0299", stv0299_attach,
&alps_bsbe1_config, &av7110->i2c_adap);
 			if (av7110->fe) {
 				av7110->fe->ops.tuner_ops.set_params =
alps_bsbe1_tuner_set_params;
 				av7110->fe->tuner_priv = &av7110->i2c_adap;
 
-				if (dvb_attach(lnbp21_attach, av7110->fe,
&av7110->i2c_adap, 0, 0) == NULL) {
+				if (dvb_attach("lnbp21", lnbp21_attach,
av7110->fe, &av7110->i2c_adap, 0, 0) == NULL) {
 					printk("dvb-ttpci: LNBP21 not
found!\n");
 					if (av7110->fe->ops.release)
 
av7110->fe->ops.release(av7110->fe);
diff -ur orig/linux/drivers/media/dvb/ttpci/budget-av.c
new/linux/drivers/media/dvb/ttpci/budget-av.c
--- orig/linux/drivers/media/dvb/ttpci/budget-av.c	2006-09-06
21:00:04.000000000 +1000
+++ new/linux/drivers/media/dvb/ttpci/budget-av.c	2006-09-07
15:45:59.000000000 +1000
@@ -1099,13 +1099,13 @@
 	case SUBID_DVBS_KNC1_PLUS:
 	case SUBID_DVBS_EASYWATCH_1:
 		if (saa->pci->subsystem_vendor == 0x1894) {
-			fe = dvb_attach(stv0299_attach,
&cinergy_1200s_1894_0010_config,
+			fe = dvb_attach("stv0299", stv0299_attach,
&cinergy_1200s_1894_0010_config,
 					     &budget_av->budget.i2c_adap);
 			if (fe) {
 				fe->ops.tuner_ops.set_params =
philips_su1278sh2_tua6100_tuner_set_params;
 			}
 		} else {
-			fe = dvb_attach(stv0299_attach, &typhoon_config,
+			fe = dvb_attach("stv0299", stv0299_attach,
&typhoon_config,
 					     &budget_av->budget.i2c_adap);
 			if (fe) {
 				fe->ops.tuner_ops.set_params =
philips_su1278_ty_ci_tuner_set_params;
@@ -1117,7 +1117,7 @@
 	case SUBID_DVBS_TV_STAR_CI:
 	case SUBID_DVBS_CYNERGY1200N:
 	case SUBID_DVBS_EASYWATCH:
-		fe = dvb_attach(stv0299_attach, &philips_sd1878_config,
+		fe = dvb_attach("stv0299", stv0299_attach,
&philips_sd1878_config,
 				&budget_av->budget.i2c_adap);
 		if (fe) {
 			fe->ops.tuner_ops.set_params =
philips_sd1878_tda8261_tuner_set_params;
@@ -1125,7 +1125,7 @@
 		break;
 
 	case SUBID_DVBS_TYPHOON:
-		fe = dvb_attach(stv0299_attach, &typhoon_config,
+		fe = dvb_attach("stv0299", stv0299_attach, &typhoon_config,
 				    &budget_av->budget.i2c_adap);
 		if (fe) {
 			fe->ops.tuner_ops.set_params =
philips_su1278_ty_ci_tuner_set_params;
@@ -1133,7 +1133,7 @@
 		break;
 
 	case SUBID_DVBS_CINERGY1200:
-		fe = dvb_attach(stv0299_attach, &cinergy_1200s_config,
+		fe = dvb_attach("stv0299", stv0299_attach,
&cinergy_1200s_config,
 				    &budget_av->budget.i2c_adap);
 		if (fe) {
 			fe->ops.tuner_ops.set_params =
philips_su1278_ty_ci_tuner_set_params;
@@ -1144,7 +1144,7 @@
 	case SUBID_DVBC_KNC1_PLUS:
 	case SUBID_DVBC_CINERGY1200:
 		budget_av->reinitialise_demod = 1;
-		fe = dvb_attach(tda10021_attach, &philips_cu1216_config,
+		fe = dvb_attach("tda10021", tda10021_attach,
&philips_cu1216_config,
 				     &budget_av->budget.i2c_adap,
 				     read_pwm(budget_av));
 		if (fe) {
@@ -1159,7 +1159,7 @@
 	case SUBID_DVBT_KNC1_PLUS:
 	case SUBID_DVBT_CINERGY1200:
 		budget_av->reinitialise_demod = 1;
-		fe = dvb_attach(tda10046_attach, &philips_tu1216_config,
+		fe = dvb_attach("tda10046", tda10046_attach,
&philips_tu1216_config,
 				     &budget_av->budget.i2c_adap);
 		if (fe) {
 			fe->ops.tuner_ops.init = philips_tu1216_tuner_init;
diff -ur orig/linux/drivers/media/dvb/ttpci/budget.c
new/linux/drivers/media/dvb/ttpci/budget.c
--- orig/linux/drivers/media/dvb/ttpci/budget.c	2006-09-06
21:00:04.000000000 +1000
+++ new/linux/drivers/media/dvb/ttpci/budget.c	2006-09-07
15:44:55.000000000 +1000
@@ -368,7 +368,7 @@
 	case 0x1003: // Hauppauge/TT Nova budget (stv0299/ALPS
BSRU6(tsa5059) OR ves1893/ALPS BSRV2(sp5659))
 	case 0x1013:
 		// try the ALPS BSRV2 first of all
-		budget->dvb_frontend = dvb_attach(ves1x93_attach,
&alps_bsrv2_config, &budget->i2c_adap);
+		budget->dvb_frontend = dvb_attach("ves1x93", ves1x93_attach,
&alps_bsrv2_config, &budget->i2c_adap);
 		if (budget->dvb_frontend) {
 			budget->dvb_frontend->ops.tuner_ops.set_params =
alps_bsrv2_tuner_set_params;
 			budget->dvb_frontend->ops.diseqc_send_master_cmd =
budget_diseqc_send_master_cmd;
@@ -378,7 +378,7 @@
 		}
 
 		// try the ALPS BSRU6 now
-		budget->dvb_frontend = dvb_attach(stv0299_attach,
&alps_bsru6_config, &budget->i2c_adap);
+		budget->dvb_frontend = dvb_attach("stv0299", stv0299_attach,
&alps_bsru6_config, &budget->i2c_adap);
 		if (budget->dvb_frontend) {
 			budget->dvb_frontend->ops.tuner_ops.set_params =
alps_bsru6_tuner_set_params;
 			budget->dvb_frontend->tuner_priv =
&budget->i2c_adap;
@@ -388,7 +388,7 @@
 
 	case 0x1004: // Hauppauge/TT DVB-C budget (ves1820/ALPS
TDBE2(sp5659))
 
-		budget->dvb_frontend = dvb_attach(ves1820_attach,
&alps_tdbe2_config, &budget->i2c_adap, read_pwm(budget));
+		budget->dvb_frontend = dvb_attach("ves1820", ves1820_attach,
&alps_tdbe2_config, &budget->i2c_adap, read_pwm(budget));
 		if (budget->dvb_frontend) {
 			budget->dvb_frontend->ops.tuner_ops.set_params =
alps_tdbe2_tuner_set_params;
 			break;
@@ -397,7 +397,7 @@
 
 	case 0x1005: // Hauppauge/TT Nova-T budget (L64781/Grundig
29504-401(tsa5060))
 
-		budget->dvb_frontend = dvb_attach(l64781_attach,
&grundig_29504_401_config, &budget->i2c_adap);
+		budget->dvb_frontend = dvb_attach("l64781", l64781_attach,
&grundig_29504_401_config, &budget->i2c_adap);
 		if (budget->dvb_frontend) {
 			budget->dvb_frontend->ops.tuner_ops.set_params =
grundig_29504_401_tuner_set_params;
 			break;
@@ -405,7 +405,7 @@
 		break;
 
 	case 0x4f60: // Fujitsu Siemens Activy Budget-S PCI rev AL
(stv0299/ALPS BSRU6(tsa5059))
-		budget->dvb_frontend = dvb_attach(stv0299_attach,
&alps_bsru6_config, &budget->i2c_adap);
+		budget->dvb_frontend = dvb_attach("stv0299", stv0299_attach,
&alps_bsru6_config, &budget->i2c_adap);
 		if (budget->dvb_frontend) {
 			budget->dvb_frontend->ops.tuner_ops.set_params =
alps_bsru6_tuner_set_params;
 			budget->dvb_frontend->tuner_priv =
&budget->i2c_adap;
@@ -415,7 +415,7 @@
 		break;
 
 	case 0x4f61: // Fujitsu Siemens Activy Budget-S PCI rev GR
(tda8083/Grundig 29504-451(tsa5522))
-		budget->dvb_frontend = dvb_attach(tda8083_attach,
&grundig_29504_451_config, &budget->i2c_adap);
+		budget->dvb_frontend = dvb_attach("tda8083", tda8083_attach,
&grundig_29504_451_config, &budget->i2c_adap);
 		if (budget->dvb_frontend) {
 			budget->dvb_frontend->ops.tuner_ops.set_params =
grundig_29504_451_tuner_set_params;
 			budget->dvb_frontend->ops.set_voltage =
siemens_budget_set_voltage;
@@ -424,10 +424,10 @@
 		break;
 
 	case 0x1016: // Hauppauge/TT Nova-S SE (samsung
s5h1420/????(tda8260))
-		budget->dvb_frontend = dvb_attach(s5h1420_attach,
&s5h1420_config, &budget->i2c_adap);
+		budget->dvb_frontend = dvb_attach("s5h1420", s5h1420_attach,
&s5h1420_config, &budget->i2c_adap);
 		if (budget->dvb_frontend) {
 			budget->dvb_frontend->ops.tuner_ops.set_params =
s5h1420_tuner_set_params;
-			if (dvb_attach(lnbp21_attach, budget->dvb_frontend,
&budget->i2c_adap, 0, 0) == NULL) {
+			if (dvb_attach("lnbp21", lnbp21_attach,
budget->dvb_frontend, &budget->i2c_adap, 0, 0) == NULL) {
 				printk("%s: No LNBP21 found!\n",
__FUNCTION__);
 				goto error_out;
 			}
@@ -441,11 +441,11 @@
 		saa7146_setgpio(budget->dev, 2, SAA7146_GPIO_OUTHI);
 		msleep(1);
 
-		budget->dvb_frontend = dvb_attach(tda10086_attach,
&tda10086_config, &budget->i2c_adap);
+		budget->dvb_frontend = dvb_attach("tda10086",
tda10086_attach, &tda10086_config, &budget->i2c_adap);
 		if (budget->dvb_frontend) {
-			if (dvb_attach(tda826x_attach, budget->dvb_frontend,
0x60, &budget->i2c_adap, 0) == NULL)
+			if (dvb_attach("tda826x", tda826x_attach,
budget->dvb_frontend, 0x60, &budget->i2c_adap, 0) == NULL)
 				printk("%s: No tda826x found!\n",
__FUNCTION__);
-			if (dvb_attach(lnbp21_attach, budget->dvb_frontend,
&budget->i2c_adap, 0, 0) == NULL) {
+			if (dvb_attach("lnbp21", lnbp21_attach,
budget->dvb_frontend, &budget->i2c_adap, 0, 0) == NULL) {
 				printk("%s: No LNBP21 found!\n",
__FUNCTION__);
 				goto error_out;
 			}
diff -ur orig/linux/drivers/media/dvb/ttpci/budget-ci.c
new/linux/drivers/media/dvb/ttpci/budget-ci.c
--- orig/linux/drivers/media/dvb/ttpci/budget-ci.c	2006-09-06
21:00:04.000000000 +1000
+++ new/linux/drivers/media/dvb/ttpci/budget-ci.c	2006-09-07
15:43:09.000000000 +1000
@@ -988,7 +988,7 @@
 	switch (budget_ci->budget.dev->pci->subsystem_device) {
 	case 0x100c:		// Hauppauge/TT Nova-CI budget (stv0299/ALPS
BSRU6(tsa5059))
 		budget_ci->budget.dvb_frontend =
-			dvb_attach(stv0299_attach, &alps_bsru6_config,
&budget_ci->budget.i2c_adap);
+			dvb_attach("stv0299", stv0299_attach,
&alps_bsru6_config, &budget_ci->budget.i2c_adap);
 		if (budget_ci->budget.dvb_frontend) {
 
budget_ci->budget.dvb_frontend->ops.tuner_ops.set_params =
alps_bsru6_tuner_set_params;
 			budget_ci->budget.dvb_frontend->tuner_priv =
&budget_ci->budget.i2c_adap;
@@ -998,7 +998,7 @@
 
 	case 0x100f:		// Hauppauge/TT Nova-CI budget
(stv0299b/Philips su1278(tsa5059))
 		budget_ci->budget.dvb_frontend =
-			dvb_attach(stv0299_attach,
&philips_su1278_tt_config, &budget_ci->budget.i2c_adap);
+			dvb_attach("stv0299", stv0299_attach,
&philips_su1278_tt_config, &budget_ci->budget.i2c_adap);
 		if (budget_ci->budget.dvb_frontend) {
 
budget_ci->budget.dvb_frontend->ops.tuner_ops.set_params =
philips_su1278_tt_tuner_set_params;
 			break;
@@ -1008,7 +1008,7 @@
 	case 0x1010:		// TT DVB-C CI budget (stv0297/Philips
tdm1316l(tda6651tt))
 		budget_ci->tuner_pll_address = 0x61;
 		budget_ci->budget.dvb_frontend =
-			dvb_attach(stv0297_attach,
&dvbc_philips_tdm1316l_config, &budget_ci->budget.i2c_adap);
+			dvb_attach("stv0297", stv0297_attach,
&dvbc_philips_tdm1316l_config, &budget_ci->budget.i2c_adap);
 		if (budget_ci->budget.dvb_frontend) {
 
budget_ci->budget.dvb_frontend->ops.tuner_ops.set_params =
dvbc_philips_tdm1316l_tuner_set_params;
 			break;
@@ -1018,7 +1018,7 @@
 	case 0x1011:		// Hauppauge/TT Nova-T budget
(tda10045/Philips tdm1316l(tda6651tt) + TDA9889)
 		budget_ci->tuner_pll_address = 0x63;
 		budget_ci->budget.dvb_frontend =
-			dvb_attach(tda10045_attach,
&philips_tdm1316l_config, &budget_ci->budget.i2c_adap);
+			dvb_attach("tda10045", tda10045_attach,
&philips_tdm1316l_config, &budget_ci->budget.i2c_adap);
 		if (budget_ci->budget.dvb_frontend) {
 			budget_ci->budget.dvb_frontend->ops.tuner_ops.init =
philips_tdm1316l_tuner_init;
 
budget_ci->budget.dvb_frontend->ops.tuner_ops.set_params =
philips_tdm1316l_tuner_set_params;
@@ -1029,7 +1029,7 @@
 	case 0x1012:		// TT DVB-T CI budget (tda10046/Philips
tdm1316l(tda6651tt))
 		budget_ci->tuner_pll_address = 0x60;
 		budget_ci->budget.dvb_frontend =
-			dvb_attach(tda10046_attach,
&philips_tdm1316l_config, &budget_ci->budget.i2c_adap);
+			dvb_attach("tda10046", tda10046_attach,
&philips_tdm1316l_config, &budget_ci->budget.i2c_adap);
 		if (budget_ci->budget.dvb_frontend) {
 			budget_ci->budget.dvb_frontend->ops.tuner_ops.init =
philips_tdm1316l_tuner_init;
 
budget_ci->budget.dvb_frontend->ops.tuner_ops.set_params =
philips_tdm1316l_tuner_set_params;
@@ -1038,13 +1038,13 @@
 		break;
 
 	case 0x1017:		// TT S-1500 PCI
-		budget_ci->budget.dvb_frontend = dvb_attach(stv0299_attach,
&alps_bsbe1_config, &budget_ci->budget.i2c_adap);
+		budget_ci->budget.dvb_frontend = dvb_attach("stv0299",
stv0299_attach, &alps_bsbe1_config, &budget_ci->budget.i2c_adap);
 		if (budget_ci->budget.dvb_frontend) {
 
budget_ci->budget.dvb_frontend->ops.tuner_ops.set_params =
alps_bsbe1_tuner_set_params;
 			budget_ci->budget.dvb_frontend->tuner_priv =
&budget_ci->budget.i2c_adap;
 
 
budget_ci->budget.dvb_frontend->ops.dishnetwork_send_legacy_command = NULL;
-			if (dvb_attach(lnbp21_attach,
budget_ci->budget.dvb_frontend, &budget_ci->budget.i2c_adap, LNBP21_LLC, 0)
== NULL) {
+			if (dvb_attach("lnbp21", lnbp21_attach,
budget_ci->budget.dvb_frontend, &budget_ci->budget.i2c_adap, LNBP21_LLC, 0)
== NULL) {
 				printk("%s: No LNBP21 found!\n",
__FUNCTION__);
 
dvb_frontend_detach(budget_ci->budget.dvb_frontend);
 				budget_ci->budget.dvb_frontend = NULL;
diff -ur orig/linux/drivers/media/dvb/ttpci/budget-patch.c
new/linux/drivers/media/dvb/ttpci/budget-patch.c
--- orig/linux/drivers/media/dvb/ttpci/budget-patch.c	2006-09-06
21:00:04.000000000 +1000
+++ new/linux/drivers/media/dvb/ttpci/budget-patch.c	2006-09-07
15:40:09.000000000 +1000
@@ -325,7 +325,7 @@
 	case 0x1013: // SATELCO Multimedia PCI
 
 		// try the ALPS BSRV2 first of all
-		budget->dvb_frontend = dvb_attach(ves1x93_attach,
&alps_bsrv2_config, &budget->i2c_adap);
+		budget->dvb_frontend = dvb_attach("ves1x93", ves1x93_attach,
&alps_bsrv2_config, &budget->i2c_adap);
 		if (budget->dvb_frontend) {
 			budget->dvb_frontend->ops.tuner_ops.set_params =
alps_bsrv2_tuner_set_params;
 			budget->dvb_frontend->ops.diseqc_send_master_cmd =
budget_patch_diseqc_send_master_cmd;
@@ -335,7 +335,7 @@
 		}
 
 		// try the ALPS BSRU6 now
-		budget->dvb_frontend = dvb_attach(stv0299_attach,
&alps_bsru6_config, &budget->i2c_adap);
+		budget->dvb_frontend = dvb_attach("stv0299", stv0299_attach,
&alps_bsru6_config, &budget->i2c_adap);
 		if (budget->dvb_frontend) {
 			budget->dvb_frontend->ops.tuner_ops.set_params =
alps_bsru6_tuner_set_params;
 			budget->dvb_frontend->tuner_priv =
&budget->i2c_adap;
@@ -347,7 +347,7 @@
 		}
 
 		// Try the grundig 29504-451
-		budget->dvb_frontend = dvb_attach(tda8083_attach,
&grundig_29504_451_config, &budget->i2c_adap);
+		budget->dvb_frontend = dvb_attach("tda8083", tda8083_attach,
&grundig_29504_451_config, &budget->i2c_adap);
 		if (budget->dvb_frontend) {
 			budget->dvb_frontend->ops.tuner_ops.set_params =
grundig_29504_451_tuner_set_params;
 			budget->dvb_frontend->ops.diseqc_send_master_cmd =
budget_diseqc_send_master_cmd;
diff -ur orig/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
new/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
--- orig/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
2006-09-06 21:00:04.000000000 +1000
+++ new/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c	2006-09-07
15:49:13.000000000 +1000
@@ -1572,13 +1572,13 @@
 	switch(le16_to_cpu(ttusb->dev->descriptor.idProduct)) {
 	case 0x1003: // Hauppauge/TT Nova-USB-S budget (stv0299/ALPS
BSRU6|BSBE1(tsa5059))
 		// try the stv0299 based first
-		ttusb->fe = dvb_attach(stv0299_attach, &alps_stv0299_config,
&ttusb->i2c_adap);
+		ttusb->fe = dvb_attach("stv0299", stv0299_attach,
&alps_stv0299_config, &ttusb->i2c_adap);
 		if (ttusb->fe != NULL) {
 			ttusb->fe->ops.tuner_ops.set_params =
philips_tsa5059_tuner_set_params;
 
 			if(ttusb->revision == TTUSB_REV_2_2) { // ALPS BSBE1
 				alps_stv0299_config.inittab =
alps_bsbe1_inittab;
-				dvb_attach(lnbp21_attach, ttusb->fe,
&ttusb->i2c_adap, 0, 0);
+				dvb_attach("lnbp21", lnbp21_attach,
ttusb->fe, &ttusb->i2c_adap, 0, 0);
 			} else { // ALPS BSRU6
 				ttusb->fe->ops.set_voltage =
ttusb_set_voltage;
 			}
@@ -1586,7 +1586,7 @@
 		}
 
 		// Grundig 29504-491
-		ttusb->fe = dvb_attach(tda8083_attach,
&ttusb_novas_grundig_29504_491_config, &ttusb->i2c_adap);
+		ttusb->fe = dvb_attach("tda8083", tda8083_attach,
&ttusb_novas_grundig_29504_491_config, &ttusb->i2c_adap);
 		if (ttusb->fe != NULL) {
 			ttusb->fe->ops.tuner_ops.set_params =
ttusb_novas_grundig_29504_491_tuner_set_params;
 			ttusb->fe->ops.set_voltage = ttusb_set_voltage;
@@ -1595,13 +1595,13 @@
 		break;
 
 	case 0x1004: // Hauppauge/TT DVB-C budget (ves1820/ALPS
TDBE2(sp5659))
-		ttusb->fe = dvb_attach(ves1820_attach, &alps_tdbe2_config,
&ttusb->i2c_adap, read_pwm(ttusb));
+		ttusb->fe = dvb_attach("ves1820", ves1820_attach,
&alps_tdbe2_config, &ttusb->i2c_adap, read_pwm(ttusb));
 		if (ttusb->fe != NULL) {
 			ttusb->fe->ops.tuner_ops.set_params =
alps_tdbe2_tuner_set_params;
 			break;
 		}
 
-		ttusb->fe = dvb_attach(stv0297_attach,
&dvbc_philips_tdm1316l_config, &ttusb->i2c_adap);
+		ttusb->fe = dvb_attach("stv0297", stv0297_attach,
&dvbc_philips_tdm1316l_config, &ttusb->i2c_adap);
 		if (ttusb->fe != NULL) {
 			ttusb->fe->ops.tuner_ops.set_params =
dvbc_philips_tdm1316l_tuner_set_params;
 			break;
@@ -1610,14 +1610,14 @@
 
 	case 0x1005: // Hauppauge/TT Nova-USB-t budget (tda10046/Philips
td1316(tda6651tt) OR cx22700/ALPS TDMB7(??))
 		// try the ALPS TDMB7 first
-		ttusb->fe = dvb_attach(cx22700_attach, &alps_tdmb7_config,
&ttusb->i2c_adap);
+		ttusb->fe = dvb_attach("cx22700", cx22700_attach,
&alps_tdmb7_config, &ttusb->i2c_adap);
 		if (ttusb->fe != NULL) {
 			ttusb->fe->ops.tuner_ops.set_params =
alps_tdmb7_tuner_set_params;
 			break;
 		}
 
 		// Philips td1316
-		ttusb->fe = dvb_attach(tda10046_attach,
&philips_tdm1316l_config, &ttusb->i2c_adap);
+		ttusb->fe = dvb_attach("tda10046", tda10046_attach,
&philips_tdm1316l_config, &ttusb->i2c_adap);
 		if (ttusb->fe != NULL) {
 			ttusb->fe->ops.tuner_ops.init =
philips_tdm1316l_tuner_init;
 			ttusb->fe->ops.tuner_ops.set_params =
philips_tdm1316l_tuner_set_params;
diff -ur orig/linux/drivers/media/video/cx88/cx88-dvb.c
new/linux/drivers/media/video/cx88/cx88-dvb.c
--- orig/linux/drivers/media/video/cx88/cx88-dvb.c	2006-09-06
21:48:27.000000000 +1000
+++ new/linux/drivers/media/video/cx88/cx88-dvb.c	2006-09-07
15:55:03.000000000 +1000
@@ -511,11 +511,11 @@
 	/* init frontend */
 	switch (dev->core->board) {
 	case CX88_BOARD_HAUPPAUGE_DVB_T1:
-		dev->dvb.frontend = dvb_attach(cx22702_attach,
+		dev->dvb.frontend = dvb_attach("cx22702", cx22702_attach,
 					       &hauppauge_novat_config,
 					       &dev->core->i2c_adap);
 		if (dev->dvb.frontend != NULL) {
-			dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61,
+			dvb_attach("dvb_pll", dvb_pll_attach,
dev->dvb.frontend, 0x61,
 				   &dev->core->i2c_adap,
 				   &dvb_pll_thomson_dtt759x);
 		}
@@ -524,11 +524,11 @@
 	case CX88_BOARD_CONEXANT_DVB_T1:
 	case CX88_BOARD_KWORLD_DVB_T_CX22702:
 	case CX88_BOARD_WINFAST_DTV1000:
-		dev->dvb.frontend = dvb_attach(cx22702_attach,
+		dev->dvb.frontend = dvb_attach("cx22702", cx22702_attach,
 					       &connexant_refboard_config,
 					       &dev->core->i2c_adap);
 		if (dev->dvb.frontend != NULL) {
-			dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x60,
+			dvb_attach("dvb_pll", dvb_pll_attach,
dev->dvb.frontend, 0x60,
 				   &dev->core->i2c_adap,
 				   &dvb_pll_thomson_dtt7579);
 		}
@@ -536,72 +536,72 @@
 	case CX88_BOARD_WINFAST_DTV2000H:
 	case CX88_BOARD_HAUPPAUGE_HVR1100:
 	case CX88_BOARD_HAUPPAUGE_HVR1100LP:
-		dev->dvb.frontend = dvb_attach(cx22702_attach,
+		dev->dvb.frontend = dvb_attach("cx22702", cx22702_attach,
 					       &hauppauge_hvr1100_config,
 					       &dev->core->i2c_adap);
 		if (dev->dvb.frontend != NULL) {
-			dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61,
+			dvb_attach("dvb_pll", dvb_pll_attach,
dev->dvb.frontend, 0x61,
 				   &dev->core->i2c_adap,
 				   &dvb_pll_fmd1216me);
 		}
 		break;
 	case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS:
 #if 0
-		dev->dvb.frontend = dvb_attach(mt352_attach,
+		dev->dvb.frontend = dvb_attach("mt352", mt352_attach,
 					       &dvico_fusionhdtv,
 					       &dev->core->i2c_adap);
 		if (dev->dvb.frontend != NULL) {
-			dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x60,
+			dvb_attach("dvb_pll", dvb_pll_attach,
dev->dvb.frontend, 0x60,
 				   NULL, &dvb_pll_thomson_dtt7579);
 			break;
 		}
 #endif
 		/* ZL10353 replaces MT352 on later cards */
-		dev->dvb.frontend = dvb_attach(zl10353_attach,
+		dev->dvb.frontend = dvb_attach("zl10353", zl10353_attach,
 					       &dvico_fusionhdtv_plus_v1_1,
 					       &dev->core->i2c_adap);
 		if (dev->dvb.frontend != NULL) {
-			dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x60,
+			dvb_attach("dvb_pll", dvb_pll_attach,
dev->dvb.frontend, 0x60,
 				   NULL, &dvb_pll_thomson_dtt7579);
 		}
 		break;
 	case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL:
 		/* The tin box says DEE1601, but it seems to be DTT7579
 		 * compatible, with a slightly different MT352 AGC gain. */
-		dev->dvb.frontend = dvb_attach(mt352_attach,
+		dev->dvb.frontend = dvb_attach("mt352", mt352_attach,
 					       &dvico_fusionhdtv_dual,
 					       &dev->core->i2c_adap);
 		if (dev->dvb.frontend != NULL) {
-			dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61,
+			dvb_attach("dvb_pll", dvb_pll_attach,
dev->dvb.frontend, 0x61,
 				   NULL, &dvb_pll_thomson_dtt7579);
 			break;
 		}
 		/* ZL10353 replaces MT352 on later cards */
-		dev->dvb.frontend = dvb_attach(zl10353_attach,
+		dev->dvb.frontend = dvb_attach("zl10353", zl10353_attach,
 					       &dvico_fusionhdtv_plus_v1_1,
 					       &dev->core->i2c_adap);
 		if (dev->dvb.frontend != NULL) {
-			dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61,
+			dvb_attach("dvb_pll", dvb_pll_attach,
dev->dvb.frontend, 0x61,
 				   NULL, &dvb_pll_thomson_dtt7579);
 		}
 		break;
 	case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1:
-		dev->dvb.frontend = dvb_attach(mt352_attach,
+		dev->dvb.frontend = dvb_attach("mt352", mt352_attach,
 					       &dvico_fusionhdtv,
 					       &dev->core->i2c_adap);
 		if (dev->dvb.frontend != NULL) {
-			dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61,
+			dvb_attach("dvb_pll", dvb_pll_attach,
dev->dvb.frontend, 0x61,
 				   NULL, &dvb_pll_lg_z201);
 		}
 		break;
 	case CX88_BOARD_KWORLD_DVB_T:
 	case CX88_BOARD_DNTV_LIVE_DVB_T:
 	case CX88_BOARD_ADSTECH_DVB_T_PCI:
-		dev->dvb.frontend = dvb_attach(mt352_attach,
+		dev->dvb.frontend = dvb_attach("mt352", mt352_attach,
 					       &dntv_live_dvbt_config,
 					       &dev->core->i2c_adap);
 		if (dev->dvb.frontend != NULL) {
-			dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61,
+			dvb_attach("dvb_pll", dvb_pll_attach,
dev->dvb.frontend, 0x61,
 				   NULL, &dvb_pll_unknown_1);
 		}
 		break;
@@ -609,7 +609,7 @@
 #ifdef HAVE_VP3054_I2C
 		dev->core->pll_addr = 0x61;
 		dev->core->pll_desc = &dvb_pll_fmd1216me;
-		dev->dvb.frontend = dvb_attach(mt352_attach,
&dntv_live_dvbt_pro_config,
+		dev->dvb.frontend = dvb_attach("mt352", mt352_attach,
&dntv_live_dvbt_pro_config,
 			&((struct vp3054_i2c_state *)dev->card_priv)->adap);
 		if (dev->dvb.frontend != NULL) {
 			dev->dvb.frontend->ops.tuner_ops.set_params =
dntv_live_dvbt_pro_tuner_set_params;
@@ -621,7 +621,7 @@
 	case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID:
 		dev->core->pll_addr = 0x61;
 		dev->core->pll_desc = &dvb_pll_thomson_fe6600;
-		dev->dvb.frontend = dvb_attach(zl10353_attach,
+		dev->dvb.frontend = dvb_attach("zl10353", zl10353_attach,
 					       &dvico_fusionhdtv_hybrid,
 					       &dev->core->i2c_adap);
 		if (dev->dvb.frontend != NULL) {
@@ -629,11 +629,11 @@
 		}
 		break;
 	case CX88_BOARD_PCHDTV_HD3000:
-		dev->dvb.frontend = dvb_attach(or51132_attach,
+		dev->dvb.frontend = dvb_attach("or51132", or51132_attach,
 					       &pchdtv_hd3000,
 					       &dev->core->i2c_adap);
 		if (dev->dvb.frontend != NULL) {
-			dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61,
+			dvb_attach("dvb_pll", dvb_pll_attach,
dev->dvb.frontend, 0x61,
 				   &dev->core->i2c_adap,
 				   &dvb_pll_thomson_dtt761x);
 		}
@@ -653,7 +653,7 @@
 		fusionhdtv_3_gold.pll_rf_set = lgdt330x_pll_rf_set;
 		dev->core->pll_addr = 0x61;
 		dev->core->pll_desc = &dvb_pll_microtune_4042;
-		dev->dvb.frontend = dvb_attach(lgdt330x_attach,
+		dev->dvb.frontend = dvb_attach("lgdt330x", lgdt330x_attach,
 					       &fusionhdtv_3_gold,
 					       &dev->core->i2c_adap);
 		if (dev->dvb.frontend != NULL) {
@@ -673,7 +673,7 @@
 		mdelay(200);
 		dev->core->pll_addr = 0x61;
 		dev->core->pll_desc = &dvb_pll_thomson_dtt761x;
-		dev->dvb.frontend = dvb_attach(lgdt330x_attach,
+		dev->dvb.frontend = dvb_attach("lgdt330x", lgdt330x_attach,
 					       &fusionhdtv_3_gold,
 					       &dev->core->i2c_adap);
 		if (dev->dvb.frontend != NULL) {
@@ -691,7 +691,7 @@
 		mdelay(100);
 		cx_set(MO_GP0_IO, 1);
 		mdelay(200);
-		dev->dvb.frontend = dvb_attach(lgdt330x_attach,
+		dev->dvb.frontend = dvb_attach("lgdt330x", lgdt330x_attach,
 					       &fusionhdtv_5_gold,
 					       &dev->core->i2c_adap);
 		if (dev->dvb.frontend != NULL) {
@@ -709,7 +709,7 @@
 		mdelay(100);
 		cx_set(MO_GP0_IO, 1);
 		mdelay(200);
-		dev->dvb.frontend = dvb_attach(lgdt330x_attach,
+		dev->dvb.frontend = dvb_attach("lgdt330x", lgdt330x_attach,
 					       &pchdtv_hd5500,
 					       &dev->core->i2c_adap);
 		if (dev->dvb.frontend != NULL) {
@@ -718,26 +718,26 @@
 		}
 		break;
 	case CX88_BOARD_ATI_HDTVWONDER:
-		dev->dvb.frontend = dvb_attach(nxt200x_attach,
+		dev->dvb.frontend = dvb_attach("nxt200x", nxt200x_attach,
 					       &ati_hdtvwonder,
 					       &dev->core->i2c_adap);
 		if (dev->dvb.frontend != NULL) {
-			dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61,
+			dvb_attach("dvb_pll", dvb_pll_attach,
dev->dvb.frontend, 0x61,
 				   NULL, &dvb_pll_tuv1236d);
 		}
 		break;
 	case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1:
 	case CX88_BOARD_HAUPPAUGE_NOVASE2_S1:
-		dev->dvb.frontend = dvb_attach(cx24123_attach,
+		dev->dvb.frontend = dvb_attach("cx24123", cx24123_attach,
 					       &hauppauge_novas_config,
 					       &dev->core->i2c_adap);
 		if (dev->dvb.frontend) {
-			dvb_attach(isl6421_attach, dev->dvb.frontend,
+			dvb_attach("is16421", isl6421_attach,
dev->dvb.frontend,
 				   &dev->core->i2c_adap, 0x08, 0x00, 0x00);
 		}
 		break;
 	case CX88_BOARD_KWORLD_DVBS_100:
-		dev->dvb.frontend = dvb_attach(cx24123_attach,
+		dev->dvb.frontend = dvb_attach("cx24123", cx24123_attach,
 					       &kworld_dvbs_100_config,
 					       &dev->core->i2c_adap);
 		if (dev->dvb.frontend) {
@@ -746,7 +746,7 @@
 		}
 		break;
 	case CX88_BOARD_GENIATECH_DVBS:
-		dev->dvb.frontend = dvb_attach(cx24123_attach,
+		dev->dvb.frontend = dvb_attach("cx24123", cx24123_attach,
 					       &geniatech_dvbs_config,
 					       &dev->core->i2c_adap);
 		if (dev->dvb.frontend) {
diff -ur orig/linux/drivers/media/video/saa7134/saa7134-dvb.c
new/linux/drivers/media/video/saa7134/saa7134-dvb.c
--- orig/linux/drivers/media/video/saa7134/saa7134-dvb.c	2006-09-06
21:00:04.000000000 +1000
+++ new/linux/drivers/media/video/saa7134/saa7134-dvb.c	2006-09-07
15:51:25.000000000 +1000
@@ -1049,7 +1049,7 @@
 	switch (dev->board) {
 	case SAA7134_BOARD_PINNACLE_300I_DVBT_PAL:
 		printk("%s: pinnacle 300i dvb setup\n",dev->name);
-		dev->dvb.frontend = dvb_attach(mt352_attach, &pinnacle_300i,
+		dev->dvb.frontend = dvb_attach("mt352", mt352_attach,
&pinnacle_300i,
 					       &dev->i2c_adap);
 		if (dev->dvb.frontend) {
 			dev->dvb.frontend->ops.tuner_ops.set_params =
mt352_pinnacle_tuner_set_params;
@@ -1057,14 +1057,14 @@
 		break;
 	case SAA7134_BOARD_AVERMEDIA_777:
 		printk("%s: avertv 777 dvb setup\n",dev->name);
-		dev->dvb.frontend = dvb_attach(mt352_attach, &avermedia_777,
+		dev->dvb.frontend = dvb_attach("mt352", mt352_attach,
&avermedia_777,
 					       &dev->i2c_adap);
 		if (dev->dvb.frontend) {
 			dev->dvb.frontend->ops.tuner_ops.calc_regs =
mt352_aver777_tuner_calc_regs;
 		}
 		break;
 	case SAA7134_BOARD_MD7134:
-		dev->dvb.frontend = dvb_attach(tda10046_attach,
+		dev->dvb.frontend = dvb_attach("tda10046", tda10046_attach,
 					       &medion_cardbus,
 					       &dev->i2c_adap);
 		if (dev->dvb.frontend) {
@@ -1074,7 +1074,7 @@
 		}
 		break;
 	case SAA7134_BOARD_PHILIPS_TOUGH:
-		dev->dvb.frontend = dvb_attach(tda10046_attach,
+		dev->dvb.frontend = dvb_attach("tda10046", tda10046_attach,
 					       &philips_tu1216_60_config,
 					       &dev->i2c_adap);
 		if (dev->dvb.frontend) {
@@ -1083,7 +1083,7 @@
 		}
 		break;
 	case SAA7134_BOARD_FLYDVBTDUO:
-		dev->dvb.frontend = dvb_attach(tda10046_attach,
+		dev->dvb.frontend = dvb_attach("tda10046", tda10046_attach,
 					       &tda827x_lifeview_config,
 					       &dev->i2c_adap);
 		if (dev->dvb.frontend) {
@@ -1093,7 +1093,7 @@
 		}
 		break;
 	case SAA7134_BOARD_FLYDVBT_DUO_CARDBUS:
-		dev->dvb.frontend = dvb_attach(tda10046_attach,
+		dev->dvb.frontend = dvb_attach("tda10046", tda10046_attach,
 					       &tda827x_lifeview_config,
 					       &dev->i2c_adap);
 		if (dev->dvb.frontend) {
@@ -1103,7 +1103,7 @@
 		}
 		break;
 	case SAA7134_BOARD_PHILIPS_EUROPA:
-		dev->dvb.frontend = dvb_attach(tda10046_attach,
+		dev->dvb.frontend = dvb_attach("tda10046", tda10046_attach,
 					       &philips_europa_config,
 					       &dev->i2c_adap);
 		if (dev->dvb.frontend) {
@@ -1115,7 +1115,7 @@
 		}
 		break;
 	case SAA7134_BOARD_VIDEOMATE_DVBT_300:
-		dev->dvb.frontend = dvb_attach(tda10046_attach,
+		dev->dvb.frontend = dvb_attach("tda10046", tda10046_attach,
 					       &philips_europa_config,
 					       &dev->i2c_adap);
 		if (dev->dvb.frontend) {
@@ -1125,7 +1125,7 @@
 		}
 		break;
 	case SAA7134_BOARD_VIDEOMATE_DVBT_200:
-		dev->dvb.frontend = dvb_attach(tda10046_attach,
+		dev->dvb.frontend = dvb_attach("tda10046", tda10046_attach,
 					       &philips_tu1216_61_config,
 					       &dev->i2c_adap);
 		if (dev->dvb.frontend) {
@@ -1134,7 +1134,7 @@
 		}
 		break;
 	case SAA7134_BOARD_PHILIPS_TIGER:
-		dev->dvb.frontend = dvb_attach(tda10046_attach,
+		dev->dvb.frontend = dvb_attach("tda10046", tda10046_attach,
 					       &philips_tiger_config,
 					       &dev->i2c_adap);
 		if (dev->dvb.frontend) {
@@ -1144,7 +1144,7 @@
 		}
 		break;
 	case SAA7134_BOARD_ASUSTeK_P7131_DUAL:
-		dev->dvb.frontend = dvb_attach(tda10046_attach,
+		dev->dvb.frontend = dvb_attach("tda10046", tda10046_attach,
 					       &philips_tiger_config,
 					       &dev->i2c_adap);
 		if (dev->dvb.frontend) {
@@ -1154,7 +1154,7 @@
 		}
 		break;
 	case SAA7134_BOARD_FLYDVBT_LR301:
-		dev->dvb.frontend = dvb_attach(tda10046_attach,
+		dev->dvb.frontend = dvb_attach("tda10046", tda10046_attach,
 					       &tda827x_lifeview_config,
 					       &dev->i2c_adap);
 		if (dev->dvb.frontend) {
@@ -1164,7 +1164,7 @@
 		}
 		break;
 	case SAA7134_BOARD_FLYDVB_TRIO:
-		dev->dvb.frontend = dvb_attach(tda10046_attach,
+		dev->dvb.frontend = dvb_attach("tda10046", tda10046_attach,
 					       &lifeview_trio_config,
 					       &dev->i2c_adap);
 		if (dev->dvb.frontend) {
@@ -1173,7 +1173,7 @@
 		}
 		break;
 	case SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331:
-		dev->dvb.frontend = dvb_attach(tda10046_attach,
+		dev->dvb.frontend = dvb_attach("tda10046", tda10046_attach,
 					       &ads_tech_duo_config,
 					       &dev->i2c_adap);
 		if (dev->dvb.frontend) {
@@ -1183,7 +1183,7 @@
 		}
 		break;
 	case SAA7134_BOARD_TEVION_DVBT_220RF:
-		dev->dvb.frontend = dvb_attach(tda10046_attach,
+		dev->dvb.frontend = dvb_attach("tda10046", tda10046_attach,
 					       &tevion_dvbt220rf_config,
 					       &dev->i2c_adap);
 		if (dev->dvb.frontend) {
@@ -1192,7 +1192,7 @@
 		}
 		break;
 	case SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS:
-		dev->dvb.frontend = dvb_attach(tda10046_attach,
+		dev->dvb.frontend = dvb_attach("tda10046", tda10046_attach,
 					       &ads_tech_duo_config,
 					       &dev->i2c_adap);
 		if (dev->dvb.frontend) {
@@ -1211,30 +1211,30 @@
 		}
 		break;
 	case SAA7134_BOARD_AVERMEDIA_AVERTVHD_A180:
-		dev->dvb.frontend = dvb_attach(nxt200x_attach,
&avertvhda180,
+		dev->dvb.frontend = dvb_attach("nxt200x", nxt200x_attach,
&avertvhda180,
 					       &dev->i2c_adap);
 		if (dev->dvb.frontend) {
-			dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61,
+			dvb_attach("dvb_pll", dvb_pll_attach,
dev->dvb.frontend, 0x61,
 				   NULL, &dvb_pll_tdhu2);
 		}
 		break;
 	case SAA7134_BOARD_KWORLD_ATSC110:
-		dev->dvb.frontend = dvb_attach(nxt200x_attach,
&kworldatsc110,
+		dev->dvb.frontend = dvb_attach("nxt200x", nxt200x_attach,
&kworldatsc110,
 					       &dev->i2c_adap);
 		if (dev->dvb.frontend) {
-			dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61,
+			dvb_attach("dvb_pll", dvb_pll_attach,
dev->dvb.frontend, 0x61,
 				   NULL, &dvb_pll_tuv1236d);
 		}
 		break;
 	case SAA7134_BOARD_FLYDVBS_LR300:
-		dev->dvb.frontend = dvb_attach(tda10086_attach, &flydvbs,
+		dev->dvb.frontend = dvb_attach("tda10086", tda10086_attach,
&flydvbs,
 					       &dev->i2c_adap);
 		if (dev->dvb.frontend) {
-			if (dvb_attach(tda826x_attach, dev->dvb.frontend,
0x60,
+			if (dvb_attach("tda826x", tda826x_attach,
dev->dvb.frontend, 0x60,
 				       &dev->i2c_adap, 0) == NULL) {
 				printk("%s: No tda826x found!\n",
__FUNCTION__);
 			}
-			if (dvb_attach(isl6421_attach, dev->dvb.frontend,
+			if (dvb_attach("isl6421", isl6421_attach,
dev->dvb.frontend,
 				       &dev->i2c_adap, 0x08, 0, 0) == NULL)
{
 				printk("%s: No ISL6421 found!\n",
__FUNCTION__);
 			}
--




More information about the linux-dvb mailing list