diff options
author | Janne Grunau <janne-dvb@grunau.be> | 2008-04-09 18:13:13 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 13:08:00 -0400 |
commit | 78e92006f410a4044f8c1760c25ac9d11d259aa2 (patch) | |
tree | 293de8abe261420df2db5e12936ec2721ea52c7c /drivers/media/dvb/dvb-usb | |
parent | 9950c1b5b4b86d4aae12853c2f0a0ef11d976764 (diff) |
V4L/DVB (7538): Adds selectable adapter numbers as per module option
The adapter_nr module options can be used to allocate static adapter
numbers on a driver level. It avoids problems with changing DVB apapter
numbers after warm/cold boot or device unplugging and repluging.
Each driver holds DVB_MAX_ADAPTER long array of the preferred order of
adapter numbers.
options dvb-usb-dib0700 adapter_nr=7,6,5,4,3,2,1,0 would result in a
reversed allocation of adapter numbers.
With adapter_nr=2,5 it tries first to get adapter number 2 and 5. If
both are already in use it will allocate the lowest free adapter number.
Signed-off-by: Janne Grunau <janne-dvb@grunau.be>
Acked-by: Hermann Pitton <hermann.pitton@arcor.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/dvb-usb')
22 files changed, 141 insertions, 55 deletions
diff --git a/drivers/media/dvb/dvb-usb/a800.c b/drivers/media/dvb/dvb-usb/a800.c index a6c5f19f680d..dc8c8784caa8 100644 --- a/drivers/media/dvb/dvb-usb/a800.c +++ b/drivers/media/dvb/dvb-usb/a800.c | |||
@@ -18,6 +18,9 @@ | |||
18 | static int debug; | 18 | static int debug; |
19 | module_param(debug, int, 0644); | 19 | module_param(debug, int, 0644); |
20 | MODULE_PARM_DESC(debug, "set debugging level (rc=1 (or-able))." DVB_USB_DEBUG_STATUS); | 20 | MODULE_PARM_DESC(debug, "set debugging level (rc=1 (or-able))." DVB_USB_DEBUG_STATUS); |
21 | |||
22 | DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); | ||
23 | |||
21 | #define deb_rc(args...) dprintk(debug,0x01,args) | 24 | #define deb_rc(args...) dprintk(debug,0x01,args) |
22 | 25 | ||
23 | static int a800_power_ctrl(struct dvb_usb_device *d, int onoff) | 26 | static int a800_power_ctrl(struct dvb_usb_device *d, int onoff) |
@@ -94,7 +97,8 @@ static struct dvb_usb_device_properties a800_properties; | |||
94 | static int a800_probe(struct usb_interface *intf, | 97 | static int a800_probe(struct usb_interface *intf, |
95 | const struct usb_device_id *id) | 98 | const struct usb_device_id *id) |
96 | { | 99 | { |
97 | return dvb_usb_device_init(intf,&a800_properties,THIS_MODULE,NULL); | 100 | return dvb_usb_device_init(intf, &a800_properties, |
101 | THIS_MODULE, NULL, adapter_nr); | ||
98 | } | 102 | } |
99 | 103 | ||
100 | /* do not change the order of the ID table */ | 104 | /* do not change the order of the ID table */ |
diff --git a/drivers/media/dvb/dvb-usb/af9005.c b/drivers/media/dvb/dvb-usb/af9005.c index e7f76f515b4f..cfe71feefcad 100644 --- a/drivers/media/dvb/dvb-usb/af9005.c +++ b/drivers/media/dvb/dvb-usb/af9005.c | |||
@@ -39,6 +39,8 @@ int dvb_usb_af9005_dump_eeprom = 0; | |||
39 | module_param_named(dump_eeprom, dvb_usb_af9005_dump_eeprom, int, 0); | 39 | module_param_named(dump_eeprom, dvb_usb_af9005_dump_eeprom, int, 0); |
40 | MODULE_PARM_DESC(dump_eeprom, "dump contents of the eeprom."); | 40 | MODULE_PARM_DESC(dump_eeprom, "dump contents of the eeprom."); |
41 | 41 | ||
42 | DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); | ||
43 | |||
42 | /* remote control decoder */ | 44 | /* remote control decoder */ |
43 | int (*rc_decode) (struct dvb_usb_device * d, u8 * data, int len, u32 * event, | 45 | int (*rc_decode) (struct dvb_usb_device * d, u8 * data, int len, u32 * event, |
44 | int *state); | 46 | int *state); |
@@ -1020,7 +1022,8 @@ static struct dvb_usb_device_properties af9005_properties; | |||
1020 | static int af9005_usb_probe(struct usb_interface *intf, | 1022 | static int af9005_usb_probe(struct usb_interface *intf, |
1021 | const struct usb_device_id *id) | 1023 | const struct usb_device_id *id) |
1022 | { | 1024 | { |
1023 | return dvb_usb_device_init(intf, &af9005_properties, THIS_MODULE, NULL); | 1025 | return dvb_usb_device_init(intf, &af9005_properties, |
1026 | THIS_MODULE, NULL, adapter_nr); | ||
1024 | } | 1027 | } |
1025 | 1028 | ||
1026 | static struct usb_device_id af9005_usb_table[] = { | 1029 | static struct usb_device_id af9005_usb_table[] = { |
diff --git a/drivers/media/dvb/dvb-usb/au6610.c b/drivers/media/dvb/dvb-usb/au6610.c index f3ff81314696..2ccb90fa60c8 100644 --- a/drivers/media/dvb/dvb-usb/au6610.c +++ b/drivers/media/dvb/dvb-usb/au6610.c | |||
@@ -19,6 +19,8 @@ static int dvb_usb_au6610_debug; | |||
19 | module_param_named(debug, dvb_usb_au6610_debug, int, 0644); | 19 | module_param_named(debug, dvb_usb_au6610_debug, int, 0644); |
20 | MODULE_PARM_DESC(debug, "set debugging level (1=rc (or-able))." DVB_USB_DEBUG_STATUS); | 20 | MODULE_PARM_DESC(debug, "set debugging level (1=rc (or-able))." DVB_USB_DEBUG_STATUS); |
21 | 21 | ||
22 | DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); | ||
23 | |||
22 | static int au6610_usb_msg(struct dvb_usb_device *d, u8 operation, u8 addr, | 24 | static int au6610_usb_msg(struct dvb_usb_device *d, u8 operation, u8 addr, |
23 | u8 *wbuf, u16 wlen, u8 *rbuf, u16 rlen) | 25 | u8 *wbuf, u16 wlen, u8 *rbuf, u16 rlen) |
24 | { | 26 | { |
@@ -163,7 +165,9 @@ static int au6610_probe(struct usb_interface *intf, | |||
163 | if (intf->num_altsetting < AU6610_ALTSETTING_COUNT) | 165 | if (intf->num_altsetting < AU6610_ALTSETTING_COUNT) |
164 | return -ENODEV; | 166 | return -ENODEV; |
165 | 167 | ||
166 | if ((ret = dvb_usb_device_init(intf, &au6610_properties, THIS_MODULE, &d)) == 0) { | 168 | ret = dvb_usb_device_init(intf, &au6610_properties, THIS_MODULE, &d, |
169 | adapter_nr); | ||
170 | if (ret == 0) { | ||
167 | alt = usb_altnum_to_altsetting(intf, AU6610_ALTSETTING); | 171 | alt = usb_altnum_to_altsetting(intf, AU6610_ALTSETTING); |
168 | 172 | ||
169 | if (alt == NULL) { | 173 | if (alt == NULL) { |
diff --git a/drivers/media/dvb/dvb-usb/cxusb.c b/drivers/media/dvb/dvb-usb/cxusb.c index 4e5118dfe2e0..c4b00660c65f 100644 --- a/drivers/media/dvb/dvb-usb/cxusb.c +++ b/drivers/media/dvb/dvb-usb/cxusb.c | |||
@@ -40,6 +40,9 @@ | |||
40 | static int dvb_usb_cxusb_debug; | 40 | static int dvb_usb_cxusb_debug; |
41 | module_param_named(debug, dvb_usb_cxusb_debug, int, 0644); | 41 | module_param_named(debug, dvb_usb_cxusb_debug, int, 0644); |
42 | MODULE_PARM_DESC(debug, "set debugging level (1=rc (or-able))." DVB_USB_DEBUG_STATUS); | 42 | MODULE_PARM_DESC(debug, "set debugging level (1=rc (or-able))." DVB_USB_DEBUG_STATUS); |
43 | |||
44 | DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); | ||
45 | |||
43 | #define deb_info(args...) dprintk(dvb_usb_cxusb_debug,0x01,args) | 46 | #define deb_info(args...) dprintk(dvb_usb_cxusb_debug,0x01,args) |
44 | #define deb_i2c(args...) if (d->udev->descriptor.idVendor == USB_VID_MEDION) \ | 47 | #define deb_i2c(args...) if (d->udev->descriptor.idVendor == USB_VID_MEDION) \ |
45 | dprintk(dvb_usb_cxusb_debug,0x01,args) | 48 | dprintk(dvb_usb_cxusb_debug,0x01,args) |
@@ -723,16 +726,24 @@ static struct dvb_usb_device_properties cxusb_bluebird_nano2_needsfirmware_prope | |||
723 | static int cxusb_probe(struct usb_interface *intf, | 726 | static int cxusb_probe(struct usb_interface *intf, |
724 | const struct usb_device_id *id) | 727 | const struct usb_device_id *id) |
725 | { | 728 | { |
726 | if (dvb_usb_device_init(intf,&cxusb_medion_properties,THIS_MODULE,NULL) == 0 || | 729 | if (0 == dvb_usb_device_init(intf, &cxusb_medion_properties, |
727 | dvb_usb_device_init(intf,&cxusb_bluebird_lgh064f_properties,THIS_MODULE,NULL) == 0 || | 730 | THIS_MODULE, NULL, adapter_nr) || |
728 | dvb_usb_device_init(intf,&cxusb_bluebird_dee1601_properties,THIS_MODULE,NULL) == 0 || | 731 | 0 == dvb_usb_device_init(intf, &cxusb_bluebird_lgh064f_properties, |
729 | dvb_usb_device_init(intf,&cxusb_bluebird_lgz201_properties,THIS_MODULE,NULL) == 0 || | 732 | THIS_MODULE, NULL, adapter_nr) || |
730 | dvb_usb_device_init(intf,&cxusb_bluebird_dtt7579_properties,THIS_MODULE,NULL) == 0 || | 733 | 0 == dvb_usb_device_init(intf, &cxusb_bluebird_dee1601_properties, |
731 | dvb_usb_device_init(intf,&cxusb_bluebird_dualdig4_properties,THIS_MODULE,NULL) == 0 || | 734 | THIS_MODULE, NULL, adapter_nr) || |
732 | dvb_usb_device_init(intf,&cxusb_bluebird_nano2_properties,THIS_MODULE,NULL) == 0 || | 735 | 0 == dvb_usb_device_init(intf, &cxusb_bluebird_lgz201_properties, |
733 | dvb_usb_device_init(intf,&cxusb_bluebird_nano2_needsfirmware_properties,THIS_MODULE,NULL) == 0) { | 736 | THIS_MODULE, NULL, adapter_nr) || |
737 | 0 == dvb_usb_device_init(intf, &cxusb_bluebird_dtt7579_properties, | ||
738 | THIS_MODULE, NULL, adapter_nr) || | ||
739 | 0 == dvb_usb_device_init(intf, &cxusb_bluebird_dualdig4_properties, | ||
740 | THIS_MODULE, NULL, adapter_nr) || | ||
741 | 0 == dvb_usb_device_init(intf, &cxusb_bluebird_nano2_properties, | ||
742 | THIS_MODULE, NULL, adapter_nr) || | ||
743 | 0 == dvb_usb_device_init(intf, | ||
744 | &cxusb_bluebird_nano2_needsfirmware_properties, | ||
745 | THIS_MODULE, NULL, adapter_nr)) | ||
734 | return 0; | 746 | return 0; |
735 | } | ||
736 | 747 | ||
737 | return -EINVAL; | 748 | return -EINVAL; |
738 | } | 749 | } |
diff --git a/drivers/media/dvb/dvb-usb/dib0700_core.c b/drivers/media/dvb/dvb-usb/dib0700_core.c index 4b3836e63be9..595a04696c87 100644 --- a/drivers/media/dvb/dvb-usb/dib0700_core.c +++ b/drivers/media/dvb/dvb-usb/dib0700_core.c | |||
@@ -17,6 +17,8 @@ int dvb_usb_dib0700_ir_proto = 1; | |||
17 | module_param(dvb_usb_dib0700_ir_proto, int, 0644); | 17 | module_param(dvb_usb_dib0700_ir_proto, int, 0644); |
18 | MODULE_PARM_DESC(dvb_usb_dib0700_ir_proto, "set ir protocol (0=NEC, 1=RC5 (default), 2=RC6)."); | 18 | MODULE_PARM_DESC(dvb_usb_dib0700_ir_proto, "set ir protocol (0=NEC, 1=RC5 (default), 2=RC6)."); |
19 | 19 | ||
20 | DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); | ||
21 | |||
20 | /* expecting rx buffer: request data[0] data[1] ... data[2] */ | 22 | /* expecting rx buffer: request data[0] data[1] ... data[2] */ |
21 | static int dib0700_ctrl_wr(struct dvb_usb_device *d, u8 *tx, u8 txlen) | 23 | static int dib0700_ctrl_wr(struct dvb_usb_device *d, u8 *tx, u8 txlen) |
22 | { | 24 | { |
@@ -279,7 +281,8 @@ static int dib0700_probe(struct usb_interface *intf, | |||
279 | struct dvb_usb_device *dev; | 281 | struct dvb_usb_device *dev; |
280 | 282 | ||
281 | for (i = 0; i < dib0700_device_count; i++) | 283 | for (i = 0; i < dib0700_device_count; i++) |
282 | if (dvb_usb_device_init(intf, &dib0700_devices[i], THIS_MODULE, &dev) == 0) | 284 | if (dvb_usb_device_init(intf, &dib0700_devices[i], THIS_MODULE, |
285 | &dev, adapter_nr) == 0) | ||
283 | { | 286 | { |
284 | dib0700_rc_setup(dev); | 287 | dib0700_rc_setup(dev); |
285 | return 0; | 288 | return 0; |
diff --git a/drivers/media/dvb/dvb-usb/dibusb-mb.c b/drivers/media/dvb/dvb-usb/dibusb-mb.c index 043cadae0859..eeef50bff4f9 100644 --- a/drivers/media/dvb/dvb-usb/dibusb-mb.c +++ b/drivers/media/dvb/dvb-usb/dibusb-mb.c | |||
@@ -14,6 +14,8 @@ | |||
14 | */ | 14 | */ |
15 | #include "dibusb.h" | 15 | #include "dibusb.h" |
16 | 16 | ||
17 | DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); | ||
18 | |||
17 | static int dib3000mb_i2c_gate_ctrl(struct dvb_frontend* fe, int enable) | 19 | static int dib3000mb_i2c_gate_ctrl(struct dvb_frontend* fe, int enable) |
18 | { | 20 | { |
19 | struct dvb_usb_adapter *adap = fe->dvb->priv; | 21 | struct dvb_usb_adapter *adap = fe->dvb->priv; |
@@ -107,10 +109,14 @@ static struct dvb_usb_device_properties artec_t1_usb2_properties; | |||
107 | static int dibusb_probe(struct usb_interface *intf, | 109 | static int dibusb_probe(struct usb_interface *intf, |
108 | const struct usb_device_id *id) | 110 | const struct usb_device_id *id) |
109 | { | 111 | { |
110 | if (dvb_usb_device_init(intf,&dibusb1_1_properties,THIS_MODULE,NULL) == 0 || | 112 | if (0 == dvb_usb_device_init(intf, &dibusb1_1_properties, |
111 | dvb_usb_device_init(intf,&dibusb1_1_an2235_properties,THIS_MODULE,NULL) == 0 || | 113 | THIS_MODULE, NULL, adapter_nr) || |
112 | dvb_usb_device_init(intf,&dibusb2_0b_properties,THIS_MODULE,NULL) == 0 || | 114 | 0 == dvb_usb_device_init(intf, &dibusb1_1_an2235_properties, |
113 | dvb_usb_device_init(intf,&artec_t1_usb2_properties,THIS_MODULE,NULL) == 0) | 115 | THIS_MODULE, NULL, adapter_nr) || |
116 | 0 == dvb_usb_device_init(intf, &dibusb2_0b_properties, | ||
117 | THIS_MODULE, NULL, adapter_nr) || | ||
118 | 0 == dvb_usb_device_init(intf, &artec_t1_usb2_properties, | ||
119 | THIS_MODULE, NULL, adapter_nr)) | ||
114 | return 0; | 120 | return 0; |
115 | 121 | ||
116 | return -EINVAL; | 122 | return -EINVAL; |
diff --git a/drivers/media/dvb/dvb-usb/dibusb-mc.c b/drivers/media/dvb/dvb-usb/dibusb-mc.c index e7ea3e753d6d..059cec955318 100644 --- a/drivers/media/dvb/dvb-usb/dibusb-mc.c +++ b/drivers/media/dvb/dvb-usb/dibusb-mc.c | |||
@@ -14,13 +14,16 @@ | |||
14 | */ | 14 | */ |
15 | #include "dibusb.h" | 15 | #include "dibusb.h" |
16 | 16 | ||
17 | DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); | ||
18 | |||
17 | /* USB Driver stuff */ | 19 | /* USB Driver stuff */ |
18 | static struct dvb_usb_device_properties dibusb_mc_properties; | 20 | static struct dvb_usb_device_properties dibusb_mc_properties; |
19 | 21 | ||
20 | static int dibusb_mc_probe(struct usb_interface *intf, | 22 | static int dibusb_mc_probe(struct usb_interface *intf, |
21 | const struct usb_device_id *id) | 23 | const struct usb_device_id *id) |
22 | { | 24 | { |
23 | return dvb_usb_device_init(intf,&dibusb_mc_properties,THIS_MODULE,NULL); | 25 | return dvb_usb_device_init(intf, &dibusb_mc_properties, THIS_MODULE, |
26 | NULL, adapter_nr); | ||
24 | } | 27 | } |
25 | 28 | ||
26 | /* do not change the order of the ID table */ | 29 | /* do not change the order of the ID table */ |
diff --git a/drivers/media/dvb/dvb-usb/digitv.c b/drivers/media/dvb/dvb-usb/digitv.c index 3acbda4aa27e..b545cf3eab2e 100644 --- a/drivers/media/dvb/dvb-usb/digitv.c +++ b/drivers/media/dvb/dvb-usb/digitv.c | |||
@@ -20,6 +20,9 @@ | |||
20 | static int dvb_usb_digitv_debug; | 20 | static int dvb_usb_digitv_debug; |
21 | module_param_named(debug,dvb_usb_digitv_debug, int, 0644); | 21 | module_param_named(debug,dvb_usb_digitv_debug, int, 0644); |
22 | MODULE_PARM_DESC(debug, "set debugging level (1=rc (or-able))." DVB_USB_DEBUG_STATUS); | 22 | MODULE_PARM_DESC(debug, "set debugging level (1=rc (or-able))." DVB_USB_DEBUG_STATUS); |
23 | |||
24 | DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); | ||
25 | |||
23 | #define deb_rc(args...) dprintk(dvb_usb_digitv_debug,0x01,args) | 26 | #define deb_rc(args...) dprintk(dvb_usb_digitv_debug,0x01,args) |
24 | 27 | ||
25 | static int digitv_ctrl_msg(struct dvb_usb_device *d, | 28 | static int digitv_ctrl_msg(struct dvb_usb_device *d, |
@@ -256,8 +259,9 @@ static int digitv_probe(struct usb_interface *intf, | |||
256 | const struct usb_device_id *id) | 259 | const struct usb_device_id *id) |
257 | { | 260 | { |
258 | struct dvb_usb_device *d; | 261 | struct dvb_usb_device *d; |
259 | int ret; | 262 | int ret = dvb_usb_device_init(intf, &digitv_properties, THIS_MODULE, &d, |
260 | if ((ret = dvb_usb_device_init(intf,&digitv_properties,THIS_MODULE,&d)) == 0) { | 263 | adapter_nr); |
264 | if (ret == 0) { | ||
261 | u8 b[4] = { 0 }; | 265 | u8 b[4] = { 0 }; |
262 | 266 | ||
263 | if (d != NULL) { /* do that only when the firmware is loaded */ | 267 | if (d != NULL) { /* do that only when the firmware is loaded */ |
diff --git a/drivers/media/dvb/dvb-usb/dtt200u.c b/drivers/media/dvb/dvb-usb/dtt200u.c index d86cf9bee91c..81a6cbf60160 100644 --- a/drivers/media/dvb/dvb-usb/dtt200u.c +++ b/drivers/media/dvb/dvb-usb/dtt200u.c | |||
@@ -18,6 +18,8 @@ int dvb_usb_dtt200u_debug; | |||
18 | module_param_named(debug,dvb_usb_dtt200u_debug, int, 0644); | 18 | module_param_named(debug,dvb_usb_dtt200u_debug, int, 0644); |
19 | MODULE_PARM_DESC(debug, "set debugging level (1=info,xfer=2 (or-able))." DVB_USB_DEBUG_STATUS); | 19 | MODULE_PARM_DESC(debug, "set debugging level (1=info,xfer=2 (or-able))." DVB_USB_DEBUG_STATUS); |
20 | 20 | ||
21 | DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); | ||
22 | |||
21 | static int dtt200u_power_ctrl(struct dvb_usb_device *d, int onoff) | 23 | static int dtt200u_power_ctrl(struct dvb_usb_device *d, int onoff) |
22 | { | 24 | { |
23 | u8 b = SET_INIT; | 25 | u8 b = SET_INIT; |
@@ -101,11 +103,16 @@ static struct dvb_usb_device_properties wt220u_miglia_properties; | |||
101 | static int dtt200u_usb_probe(struct usb_interface *intf, | 103 | static int dtt200u_usb_probe(struct usb_interface *intf, |
102 | const struct usb_device_id *id) | 104 | const struct usb_device_id *id) |
103 | { | 105 | { |
104 | if (dvb_usb_device_init(intf,&dtt200u_properties,THIS_MODULE,NULL) == 0 || | 106 | if (0 == dvb_usb_device_init(intf, &dtt200u_properties, |
105 | dvb_usb_device_init(intf,&wt220u_properties,THIS_MODULE,NULL) == 0 || | 107 | THIS_MODULE, NULL, adapter_nr) || |
106 | dvb_usb_device_init(intf,&wt220u_fc_properties,THIS_MODULE,NULL) == 0 || | 108 | 0 == dvb_usb_device_init(intf, &wt220u_properties, |
107 | dvb_usb_device_init(intf,&wt220u_zl0353_properties,THIS_MODULE,NULL) == 0 || | 109 | THIS_MODULE, NULL, adapter_nr) || |
108 | dvb_usb_device_init(intf,&wt220u_miglia_properties,THIS_MODULE,NULL) == 0) | 110 | 0 == dvb_usb_device_init(intf, &wt220u_fc_properties, |
111 | THIS_MODULE, NULL, adapter_nr) || | ||
112 | 0 == dvb_usb_device_init(intf, &wt220u_zl0353_properties, | ||
113 | THIS_MODULE, NULL, adapter_nr) || | ||
114 | 0 == dvb_usb_device_init(intf, &wt220u_miglia_properties, | ||
115 | THIS_MODULE, NULL, adapter_nr)) | ||
109 | return 0; | 116 | return 0; |
110 | 117 | ||
111 | return -ENODEV; | 118 | return -ENODEV; |
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-common.h b/drivers/media/dvb/dvb-usb/dvb-usb-common.h index 35ab68f6dcf6..6b7b2a89242e 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb-common.h +++ b/drivers/media/dvb/dvb-usb/dvb-usb-common.h | |||
@@ -40,7 +40,8 @@ extern int dvb_usb_adapter_stream_exit(struct dvb_usb_adapter *adap); | |||
40 | extern int dvb_usb_i2c_init(struct dvb_usb_device *); | 40 | extern int dvb_usb_i2c_init(struct dvb_usb_device *); |
41 | extern int dvb_usb_i2c_exit(struct dvb_usb_device *); | 41 | extern int dvb_usb_i2c_exit(struct dvb_usb_device *); |
42 | 42 | ||
43 | extern int dvb_usb_adapter_dvb_init(struct dvb_usb_adapter *adap); | 43 | extern int dvb_usb_adapter_dvb_init(struct dvb_usb_adapter *adap, |
44 | short *adapter_nums); | ||
44 | extern int dvb_usb_adapter_dvb_exit(struct dvb_usb_adapter *adap); | 45 | extern int dvb_usb_adapter_dvb_exit(struct dvb_usb_adapter *adap); |
45 | extern int dvb_usb_adapter_frontend_init(struct dvb_usb_adapter *adap); | 46 | extern int dvb_usb_adapter_frontend_init(struct dvb_usb_adapter *adap); |
46 | extern int dvb_usb_adapter_frontend_exit(struct dvb_usb_adapter *adap); | 47 | extern int dvb_usb_adapter_frontend_exit(struct dvb_usb_adapter *adap); |
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c b/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c index 4561a672da92..ce8cd0c5d831 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c +++ b/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c | |||
@@ -77,12 +77,13 @@ static int dvb_usb_stop_feed(struct dvb_demux_feed *dvbdmxfeed) | |||
77 | return dvb_usb_ctrl_feed(dvbdmxfeed,0); | 77 | return dvb_usb_ctrl_feed(dvbdmxfeed,0); |
78 | } | 78 | } |
79 | 79 | ||
80 | int dvb_usb_adapter_dvb_init(struct dvb_usb_adapter *adap) | 80 | int dvb_usb_adapter_dvb_init(struct dvb_usb_adapter *adap, short *adapter_nums) |
81 | { | 81 | { |
82 | int ret; | 82 | int ret = dvb_register_adapter(&adap->dvb_adap, adap->dev->desc->name, |
83 | adap->dev->owner, &adap->dev->udev->dev, | ||
84 | adapter_nums); | ||
83 | 85 | ||
84 | if ((ret = dvb_register_adapter(&adap->dvb_adap, adap->dev->desc->name, | 86 | if (ret < 0) { |
85 | adap->dev->owner, &adap->dev->udev->dev)) < 0) { | ||
86 | deb_info("dvb_register_adapter failed: error %d", ret); | 87 | deb_info("dvb_register_adapter failed: error %d", ret); |
87 | goto err; | 88 | goto err; |
88 | } | 89 | } |
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-init.c b/drivers/media/dvb/dvb-usb/dvb-usb-init.c index cdd717c3fe45..e331db8c77b2 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb-init.c +++ b/drivers/media/dvb/dvb-usb/dvb-usb-init.c | |||
@@ -26,7 +26,7 @@ static int dvb_usb_force_pid_filter_usage; | |||
26 | module_param_named(force_pid_filter_usage, dvb_usb_force_pid_filter_usage, int, 0444); | 26 | module_param_named(force_pid_filter_usage, dvb_usb_force_pid_filter_usage, int, 0444); |
27 | MODULE_PARM_DESC(force_pid_filter_usage, "force all dvb-usb-devices to use a PID filter, if any (default: 0)."); | 27 | MODULE_PARM_DESC(force_pid_filter_usage, "force all dvb-usb-devices to use a PID filter, if any (default: 0)."); |
28 | 28 | ||
29 | static int dvb_usb_adapter_init(struct dvb_usb_device *d) | 29 | static int dvb_usb_adapter_init(struct dvb_usb_device *d, short *adapter_nrs) |
30 | { | 30 | { |
31 | struct dvb_usb_adapter *adap; | 31 | struct dvb_usb_adapter *adap; |
32 | int ret,n; | 32 | int ret,n; |
@@ -72,7 +72,7 @@ static int dvb_usb_adapter_init(struct dvb_usb_device *d) | |||
72 | } | 72 | } |
73 | 73 | ||
74 | if ((ret = dvb_usb_adapter_stream_init(adap)) || | 74 | if ((ret = dvb_usb_adapter_stream_init(adap)) || |
75 | (ret = dvb_usb_adapter_dvb_init(adap)) || | 75 | (ret = dvb_usb_adapter_dvb_init(adap, adapter_nrs)) || |
76 | (ret = dvb_usb_adapter_frontend_init(adap))) { | 76 | (ret = dvb_usb_adapter_frontend_init(adap))) { |
77 | return ret; | 77 | return ret; |
78 | } | 78 | } |
@@ -122,7 +122,7 @@ static int dvb_usb_exit(struct dvb_usb_device *d) | |||
122 | return 0; | 122 | return 0; |
123 | } | 123 | } |
124 | 124 | ||
125 | static int dvb_usb_init(struct dvb_usb_device *d) | 125 | static int dvb_usb_init(struct dvb_usb_device *d, short *adapter_nums) |
126 | { | 126 | { |
127 | int ret = 0; | 127 | int ret = 0; |
128 | 128 | ||
@@ -143,7 +143,7 @@ static int dvb_usb_init(struct dvb_usb_device *d) | |||
143 | dvb_usb_device_power_ctrl(d, 1); | 143 | dvb_usb_device_power_ctrl(d, 1); |
144 | 144 | ||
145 | if ((ret = dvb_usb_i2c_init(d)) || | 145 | if ((ret = dvb_usb_i2c_init(d)) || |
146 | (ret = dvb_usb_adapter_init(d))) { | 146 | (ret = dvb_usb_adapter_init(d, adapter_nums))) { |
147 | dvb_usb_exit(d); | 147 | dvb_usb_exit(d); |
148 | return ret; | 148 | return ret; |
149 | } | 149 | } |
@@ -213,8 +213,10 @@ int dvb_usb_device_power_ctrl(struct dvb_usb_device *d, int onoff) | |||
213 | /* | 213 | /* |
214 | * USB | 214 | * USB |
215 | */ | 215 | */ |
216 | int dvb_usb_device_init(struct usb_interface *intf, struct dvb_usb_device_properties | 216 | int dvb_usb_device_init(struct usb_interface *intf, |
217 | *props, struct module *owner,struct dvb_usb_device **du) | 217 | struct dvb_usb_device_properties *props, |
218 | struct module *owner, struct dvb_usb_device **du, | ||
219 | short *adapter_nums) | ||
218 | { | 220 | { |
219 | struct usb_device *udev = interface_to_usbdev(intf); | 221 | struct usb_device *udev = interface_to_usbdev(intf); |
220 | struct dvb_usb_device *d = NULL; | 222 | struct dvb_usb_device *d = NULL; |
@@ -254,7 +256,7 @@ int dvb_usb_device_init(struct usb_interface *intf, struct dvb_usb_device_proper | |||
254 | if (du != NULL) | 256 | if (du != NULL) |
255 | *du = d; | 257 | *du = d; |
256 | 258 | ||
257 | ret = dvb_usb_init(d); | 259 | ret = dvb_usb_init(d, adapter_nums); |
258 | 260 | ||
259 | if (ret == 0) | 261 | if (ret == 0) |
260 | info("%s successfully initialized and connected.",desc->name); | 262 | info("%s successfully initialized and connected.",desc->name); |
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb.h b/drivers/media/dvb/dvb-usb/dvb-usb.h index d1b3c7b81fff..b1de0f7e26e8 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb.h +++ b/drivers/media/dvb/dvb-usb/dvb-usb.h | |||
@@ -372,7 +372,10 @@ struct dvb_usb_device { | |||
372 | void *priv; | 372 | void *priv; |
373 | }; | 373 | }; |
374 | 374 | ||
375 | extern int dvb_usb_device_init(struct usb_interface *, struct dvb_usb_device_properties *, struct module *, struct dvb_usb_device **); | 375 | extern int dvb_usb_device_init(struct usb_interface *, |
376 | struct dvb_usb_device_properties *, | ||
377 | struct module *, struct dvb_usb_device **, | ||
378 | short *adapter_nums); | ||
376 | extern void dvb_usb_device_exit(struct usb_interface *); | 379 | extern void dvb_usb_device_exit(struct usb_interface *); |
377 | 380 | ||
378 | /* the generic read/write method for device control */ | 381 | /* the generic read/write method for device control */ |
diff --git a/drivers/media/dvb/dvb-usb/gl861.c b/drivers/media/dvb/dvb-usb/gl861.c index 6b99d9f4d5b3..0a8ac64a4e33 100644 --- a/drivers/media/dvb/dvb-usb/gl861.c +++ b/drivers/media/dvb/dvb-usb/gl861.c | |||
@@ -16,6 +16,8 @@ static int dvb_usb_gl861_debug; | |||
16 | module_param_named(debug,dvb_usb_gl861_debug, int, 0644); | 16 | module_param_named(debug,dvb_usb_gl861_debug, int, 0644); |
17 | MODULE_PARM_DESC(debug, "set debugging level (1=rc (or-able))." DVB_USB_DEBUG_STATUS); | 17 | MODULE_PARM_DESC(debug, "set debugging level (1=rc (or-able))." DVB_USB_DEBUG_STATUS); |
18 | 18 | ||
19 | DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); | ||
20 | |||
19 | static int gl861_i2c_msg(struct dvb_usb_device *d, u8 addr, | 21 | static int gl861_i2c_msg(struct dvb_usb_device *d, u8 addr, |
20 | u8 *wbuf, u16 wlen, u8 *rbuf, u16 rlen) | 22 | u8 *wbuf, u16 wlen, u8 *rbuf, u16 rlen) |
21 | { | 23 | { |
@@ -140,7 +142,9 @@ static int gl861_probe(struct usb_interface *intf, | |||
140 | if (intf->num_altsetting < 2) | 142 | if (intf->num_altsetting < 2) |
141 | return -ENODEV; | 143 | return -ENODEV; |
142 | 144 | ||
143 | if ((ret = dvb_usb_device_init(intf, &gl861_properties, THIS_MODULE, &d)) == 0) { | 145 | ret = dvb_usb_device_init(intf, &gl861_properties, THIS_MODULE, &d, |
146 | adapter_nr); | ||
147 | if (ret == 0) { | ||
144 | alt = usb_altnum_to_altsetting(intf, 0); | 148 | alt = usb_altnum_to_altsetting(intf, 0); |
145 | 149 | ||
146 | if (alt == NULL) { | 150 | if (alt == NULL) { |
diff --git a/drivers/media/dvb/dvb-usb/gp8psk.c b/drivers/media/dvb/dvb-usb/gp8psk.c index 83e8535014c6..9a942afaf0af 100644 --- a/drivers/media/dvb/dvb-usb/gp8psk.c +++ b/drivers/media/dvb/dvb-usb/gp8psk.c | |||
@@ -22,6 +22,8 @@ int dvb_usb_gp8psk_debug; | |||
22 | module_param_named(debug,dvb_usb_gp8psk_debug, int, 0644); | 22 | module_param_named(debug,dvb_usb_gp8psk_debug, int, 0644); |
23 | MODULE_PARM_DESC(debug, "set debugging level (1=info,xfer=2,rc=4 (or-able))." DVB_USB_DEBUG_STATUS); | 23 | MODULE_PARM_DESC(debug, "set debugging level (1=info,xfer=2,rc=4 (or-able))." DVB_USB_DEBUG_STATUS); |
24 | 24 | ||
25 | DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); | ||
26 | |||
25 | int gp8psk_usb_in_op(struct dvb_usb_device *d, u8 req, u16 value, u16 index, u8 *b, int blen) | 27 | int gp8psk_usb_in_op(struct dvb_usb_device *d, u8 req, u16 value, u16 index, u8 *b, int blen) |
26 | { | 28 | { |
27 | int ret = 0,try = 0; | 29 | int ret = 0,try = 0; |
@@ -190,7 +192,8 @@ static int gp8psk_usb_probe(struct usb_interface *intf, | |||
190 | { | 192 | { |
191 | int ret; | 193 | int ret; |
192 | struct usb_device *udev = interface_to_usbdev(intf); | 194 | struct usb_device *udev = interface_to_usbdev(intf); |
193 | ret = dvb_usb_device_init(intf,&gp8psk_properties,THIS_MODULE,NULL); | 195 | ret = dvb_usb_device_init(intf, &gp8psk_properties, |
196 | THIS_MODULE, NULL, adapter_nr); | ||
194 | if (ret == 0) { | 197 | if (ret == 0) { |
195 | info("found Genpix USB device pID = %x (hex)", | 198 | info("found Genpix USB device pID = %x (hex)", |
196 | le16_to_cpu(udev->descriptor.idProduct)); | 199 | le16_to_cpu(udev->descriptor.idProduct)); |
diff --git a/drivers/media/dvb/dvb-usb/m920x.c b/drivers/media/dvb/dvb-usb/m920x.c index 29ec2b967742..a12e6f784fda 100644 --- a/drivers/media/dvb/dvb-usb/m920x.c +++ b/drivers/media/dvb/dvb-usb/m920x.c | |||
@@ -22,6 +22,8 @@ static int dvb_usb_m920x_debug; | |||
22 | module_param_named(debug,dvb_usb_m920x_debug, int, 0644); | 22 | module_param_named(debug,dvb_usb_m920x_debug, int, 0644); |
23 | MODULE_PARM_DESC(debug, "set debugging level (1=rc (or-able))." DVB_USB_DEBUG_STATUS); | 23 | MODULE_PARM_DESC(debug, "set debugging level (1=rc (or-able))." DVB_USB_DEBUG_STATUS); |
24 | 24 | ||
25 | DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); | ||
26 | |||
25 | static int m920x_set_filter(struct dvb_usb_device *d, int type, int idx, int pid); | 27 | static int m920x_set_filter(struct dvb_usb_device *d, int type, int idx, int pid); |
26 | 28 | ||
27 | static inline int m920x_read(struct usb_device *udev, u8 request, u16 value, | 29 | static inline int m920x_read(struct usb_device *udev, u8 request, u16 value, |
@@ -618,27 +620,31 @@ static int m920x_probe(struct usb_interface *intf, | |||
618 | * multi-tuner device | 620 | * multi-tuner device |
619 | */ | 621 | */ |
620 | 622 | ||
621 | if ((ret = dvb_usb_device_init(intf, &megasky_properties, | 623 | ret = dvb_usb_device_init(intf, &megasky_properties, |
622 | THIS_MODULE, &d)) == 0) { | 624 | THIS_MODULE, &d, adapter_nr); |
625 | if (ret == 0) { | ||
623 | rc_init_seq = megasky_rc_init; | 626 | rc_init_seq = megasky_rc_init; |
624 | goto found; | 627 | goto found; |
625 | } | 628 | } |
626 | 629 | ||
627 | if ((ret = dvb_usb_device_init(intf, &digivox_mini_ii_properties, | 630 | ret = dvb_usb_device_init(intf, &digivox_mini_ii_properties, |
628 | THIS_MODULE, &d)) == 0) { | 631 | THIS_MODULE, &d, adapter_nr); |
632 | if (ret == 0) { | ||
629 | /* No remote control, so no rc_init_seq */ | 633 | /* No remote control, so no rc_init_seq */ |
630 | goto found; | 634 | goto found; |
631 | } | 635 | } |
632 | 636 | ||
633 | /* This configures both tuners on the TV Walker Twin */ | 637 | /* This configures both tuners on the TV Walker Twin */ |
634 | if ((ret = dvb_usb_device_init(intf, &tvwalkertwin_properties, | 638 | ret = dvb_usb_device_init(intf, &tvwalkertwin_properties, |
635 | THIS_MODULE, &d)) == 0) { | 639 | THIS_MODULE, &d, adapter_nr); |
640 | if (ret == 0) { | ||
636 | rc_init_seq = tvwalkertwin_rc_init; | 641 | rc_init_seq = tvwalkertwin_rc_init; |
637 | goto found; | 642 | goto found; |
638 | } | 643 | } |
639 | 644 | ||
640 | if ((ret = dvb_usb_device_init(intf, &dposh_properties, | 645 | ret = dvb_usb_device_init(intf, &dposh_properties, |
641 | THIS_MODULE, &d)) == 0) { | 646 | THIS_MODULE, &d, adapter_nr); |
647 | if (ret == 0) { | ||
642 | /* Remote controller not supported yet. */ | 648 | /* Remote controller not supported yet. */ |
643 | goto found; | 649 | goto found; |
644 | } | 650 | } |
diff --git a/drivers/media/dvb/dvb-usb/nova-t-usb2.c b/drivers/media/dvb/dvb-usb/nova-t-usb2.c index badc468170ea..07fb843c7c2b 100644 --- a/drivers/media/dvb/dvb-usb/nova-t-usb2.c +++ b/drivers/media/dvb/dvb-usb/nova-t-usb2.c | |||
@@ -15,6 +15,8 @@ static int debug; | |||
15 | module_param(debug, int, 0644); | 15 | module_param(debug, int, 0644); |
16 | MODULE_PARM_DESC(debug, "set debugging level (1=rc,2=eeprom (|-able))." DVB_USB_DEBUG_STATUS); | 16 | MODULE_PARM_DESC(debug, "set debugging level (1=rc,2=eeprom (|-able))." DVB_USB_DEBUG_STATUS); |
17 | 17 | ||
18 | DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); | ||
19 | |||
18 | #define deb_rc(args...) dprintk(debug,0x01,args) | 20 | #define deb_rc(args...) dprintk(debug,0x01,args) |
19 | #define deb_ee(args...) dprintk(debug,0x02,args) | 21 | #define deb_ee(args...) dprintk(debug,0x02,args) |
20 | 22 | ||
@@ -142,7 +144,8 @@ static struct dvb_usb_device_properties nova_t_properties; | |||
142 | static int nova_t_probe(struct usb_interface *intf, | 144 | static int nova_t_probe(struct usb_interface *intf, |
143 | const struct usb_device_id *id) | 145 | const struct usb_device_id *id) |
144 | { | 146 | { |
145 | return dvb_usb_device_init(intf,&nova_t_properties,THIS_MODULE,NULL); | 147 | return dvb_usb_device_init(intf, &nova_t_properties, |
148 | THIS_MODULE, NULL, adapter_nr); | ||
146 | } | 149 | } |
147 | 150 | ||
148 | /* do not change the order of the ID table */ | 151 | /* do not change the order of the ID table */ |
diff --git a/drivers/media/dvb/dvb-usb/opera1.c b/drivers/media/dvb/dvb-usb/opera1.c index 302cc67407c3..0eef5fe094e1 100644 --- a/drivers/media/dvb/dvb-usb/opera1.c +++ b/drivers/media/dvb/dvb-usb/opera1.c | |||
@@ -46,6 +46,9 @@ MODULE_PARM_DESC(debug, | |||
46 | "set debugging level (1=info,xfer=2,pll=4,ts=8,err=16,rc=32,fw=64 (or-able))." | 46 | "set debugging level (1=info,xfer=2,pll=4,ts=8,err=16,rc=32,fw=64 (or-able))." |
47 | DVB_USB_DEBUG_STATUS); | 47 | DVB_USB_DEBUG_STATUS); |
48 | 48 | ||
49 | DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); | ||
50 | |||
51 | |||
49 | static int opera1_xilinx_rw(struct usb_device *dev, u8 request, u16 value, | 52 | static int opera1_xilinx_rw(struct usb_device *dev, u8 request, u16 value, |
50 | u8 * data, u16 len, int flags) | 53 | u8 * data, u16 len, int flags) |
51 | { | 54 | { |
@@ -548,7 +551,8 @@ static int opera1_probe(struct usb_interface *intf, | |||
548 | return -EINVAL; | 551 | return -EINVAL; |
549 | } | 552 | } |
550 | 553 | ||
551 | if (dvb_usb_device_init(intf, &opera1_properties, THIS_MODULE, NULL) != 0) | 554 | if (0 != dvb_usb_device_init(intf, &opera1_properties, |
555 | THIS_MODULE, NULL, adapter_nr)) | ||
552 | return -EINVAL; | 556 | return -EINVAL; |
553 | return 0; | 557 | return 0; |
554 | } | 558 | } |
diff --git a/drivers/media/dvb/dvb-usb/ttusb2.c b/drivers/media/dvb/dvb-usb/ttusb2.c index 0eb33378254b..706687c78506 100644 --- a/drivers/media/dvb/dvb-usb/ttusb2.c +++ b/drivers/media/dvb/dvb-usb/ttusb2.c | |||
@@ -37,6 +37,8 @@ static int dvb_usb_ttusb2_debug; | |||
37 | module_param_named(debug,dvb_usb_ttusb2_debug, int, 0644); | 37 | module_param_named(debug,dvb_usb_ttusb2_debug, int, 0644); |
38 | MODULE_PARM_DESC(debug, "set debugging level (1=info (or-able))." DVB_USB_DEBUG_STATUS); | 38 | MODULE_PARM_DESC(debug, "set debugging level (1=info (or-able))." DVB_USB_DEBUG_STATUS); |
39 | 39 | ||
40 | DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); | ||
41 | |||
40 | struct ttusb2_state { | 42 | struct ttusb2_state { |
41 | u8 id; | 43 | u8 id; |
42 | }; | 44 | }; |
@@ -181,8 +183,10 @@ static struct dvb_usb_device_properties ttusb2_properties_s2400; | |||
181 | static int ttusb2_probe(struct usb_interface *intf, | 183 | static int ttusb2_probe(struct usb_interface *intf, |
182 | const struct usb_device_id *id) | 184 | const struct usb_device_id *id) |
183 | { | 185 | { |
184 | if (dvb_usb_device_init(intf, &ttusb2_properties, THIS_MODULE, NULL) == 0 || | 186 | if (0 == dvb_usb_device_init(intf, &ttusb2_properties, |
185 | dvb_usb_device_init(intf, &ttusb2_properties_s2400, THIS_MODULE, NULL) == 0) | 187 | THIS_MODULE, NULL, adapter_nr) || |
188 | 0 == dvb_usb_device_init(intf, &ttusb2_properties_s2400, | ||
189 | THIS_MODULE, NULL, adapter_nr)) | ||
186 | return 0; | 190 | return 0; |
187 | return -ENODEV; | 191 | return -ENODEV; |
188 | } | 192 | } |
diff --git a/drivers/media/dvb/dvb-usb/umt-010.c b/drivers/media/dvb/dvb-usb/umt-010.c index 0dcab3d4e236..9e7653bb3b66 100644 --- a/drivers/media/dvb/dvb-usb/umt-010.c +++ b/drivers/media/dvb/dvb-usb/umt-010.c | |||
@@ -13,6 +13,8 @@ | |||
13 | 13 | ||
14 | #include "mt352.h" | 14 | #include "mt352.h" |
15 | 15 | ||
16 | DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); | ||
17 | |||
16 | static int umt_mt352_demod_init(struct dvb_frontend *fe) | 18 | static int umt_mt352_demod_init(struct dvb_frontend *fe) |
17 | { | 19 | { |
18 | static u8 mt352_clock_config[] = { 0x89, 0xb8, 0x2d }; | 20 | static u8 mt352_clock_config[] = { 0x89, 0xb8, 0x2d }; |
@@ -75,7 +77,8 @@ static struct dvb_usb_device_properties umt_properties; | |||
75 | static int umt_probe(struct usb_interface *intf, | 77 | static int umt_probe(struct usb_interface *intf, |
76 | const struct usb_device_id *id) | 78 | const struct usb_device_id *id) |
77 | { | 79 | { |
78 | if (dvb_usb_device_init(intf,&umt_properties,THIS_MODULE,NULL) == 0) | 80 | if (0 == dvb_usb_device_init(intf, &umt_properties, |
81 | THIS_MODULE, NULL, adapter_nr)) | ||
79 | return 0; | 82 | return 0; |
80 | return -EINVAL; | 83 | return -EINVAL; |
81 | } | 84 | } |
diff --git a/drivers/media/dvb/dvb-usb/vp702x.c b/drivers/media/dvb/dvb-usb/vp702x.c index e553c139ac44..986fff9a5ba8 100644 --- a/drivers/media/dvb/dvb-usb/vp702x.c +++ b/drivers/media/dvb/dvb-usb/vp702x.c | |||
@@ -21,6 +21,8 @@ int dvb_usb_vp702x_debug; | |||
21 | module_param_named(debug,dvb_usb_vp702x_debug, int, 0644); | 21 | module_param_named(debug,dvb_usb_vp702x_debug, int, 0644); |
22 | MODULE_PARM_DESC(debug, "set debugging level (1=info,xfer=2,rc=4 (or-able))." DVB_USB_DEBUG_STATUS); | 22 | MODULE_PARM_DESC(debug, "set debugging level (1=info,xfer=2,rc=4 (or-able))." DVB_USB_DEBUG_STATUS); |
23 | 23 | ||
24 | DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); | ||
25 | |||
24 | struct vp702x_state { | 26 | struct vp702x_state { |
25 | int pid_filter_count; | 27 | int pid_filter_count; |
26 | int pid_filter_can_bypass; | 28 | int pid_filter_can_bypass; |
@@ -238,7 +240,8 @@ static struct dvb_usb_device_properties vp702x_properties; | |||
238 | static int vp702x_usb_probe(struct usb_interface *intf, | 240 | static int vp702x_usb_probe(struct usb_interface *intf, |
239 | const struct usb_device_id *id) | 241 | const struct usb_device_id *id) |
240 | { | 242 | { |
241 | return dvb_usb_device_init(intf,&vp702x_properties,THIS_MODULE,NULL); | 243 | return dvb_usb_device_init(intf, &vp702x_properties, |
244 | THIS_MODULE, NULL, adapter_nr); | ||
242 | } | 245 | } |
243 | 246 | ||
244 | static struct usb_device_id vp702x_usb_table [] = { | 247 | static struct usb_device_id vp702x_usb_table [] = { |
diff --git a/drivers/media/dvb/dvb-usb/vp7045.c b/drivers/media/dvb/dvb-usb/vp7045.c index c172babf59bb..acb345504e0d 100644 --- a/drivers/media/dvb/dvb-usb/vp7045.c +++ b/drivers/media/dvb/dvb-usb/vp7045.c | |||
@@ -18,6 +18,9 @@ | |||
18 | static int dvb_usb_vp7045_debug; | 18 | static int dvb_usb_vp7045_debug; |
19 | module_param_named(debug,dvb_usb_vp7045_debug, int, 0644); | 19 | module_param_named(debug,dvb_usb_vp7045_debug, int, 0644); |
20 | MODULE_PARM_DESC(debug, "set debugging level (1=info,xfer=2,rc=4 (or-able))." DVB_USB_DEBUG_STATUS); | 20 | MODULE_PARM_DESC(debug, "set debugging level (1=info,xfer=2,rc=4 (or-able))." DVB_USB_DEBUG_STATUS); |
21 | |||
22 | DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); | ||
23 | |||
21 | #define deb_info(args...) dprintk(dvb_usb_vp7045_debug,0x01,args) | 24 | #define deb_info(args...) dprintk(dvb_usb_vp7045_debug,0x01,args) |
22 | #define deb_xfer(args...) dprintk(dvb_usb_vp7045_debug,0x02,args) | 25 | #define deb_xfer(args...) dprintk(dvb_usb_vp7045_debug,0x02,args) |
23 | #define deb_rc(args...) dprintk(dvb_usb_vp7045_debug,0x04,args) | 26 | #define deb_rc(args...) dprintk(dvb_usb_vp7045_debug,0x04,args) |
@@ -219,7 +222,8 @@ static struct dvb_usb_device_properties vp7045_properties; | |||
219 | static int vp7045_usb_probe(struct usb_interface *intf, | 222 | static int vp7045_usb_probe(struct usb_interface *intf, |
220 | const struct usb_device_id *id) | 223 | const struct usb_device_id *id) |
221 | { | 224 | { |
222 | return dvb_usb_device_init(intf,&vp7045_properties,THIS_MODULE,NULL); | 225 | return dvb_usb_device_init(intf, &vp7045_properties, |
226 | THIS_MODULE, NULL, adapter_nr); | ||
223 | } | 227 | } |
224 | 228 | ||
225 | static struct usb_device_id vp7045_usb_table [] = { | 229 | static struct usb_device_id vp7045_usb_table [] = { |