#define MAX_NO_OF_ADAPTER_PER_DEVICE 2
struct dvb_usb_device_properties {
struct module *owner;
+ short *adapter_nr;
#define DVB_USB_IS_AN_I2C_ADAPTER 0x01
int caps;
};
extern int dvb_usbv2_device_init(struct usb_interface *,
- const struct usb_device_id *,
- short *adapter_nums);
+ const struct usb_device_id *);
extern void dvb_usbv2_device_exit(struct usb_interface *);
/* the generic read/write method for device control */
extern int dvb_usb_i2c_init(struct dvb_usb_device *);
extern int dvb_usb_i2c_exit(struct dvb_usb_device *);
-extern int dvb_usb_adapter_dvb_init(struct dvb_usb_adapter *adap,
- short *adapter_nums);
+extern int dvb_usb_adapter_dvb_init(struct dvb_usb_adapter *adap);
extern int dvb_usb_adapter_dvb_exit(struct dvb_usb_adapter *adap);
extern int dvb_usb_adapter_frontend_init(struct dvb_usb_adapter *adap);
extern int dvb_usb_adapter_frontend_exit(struct dvb_usb_adapter *adap);
return dvb_usb_ctrl_feed(dvbdmxfeed,0);
}
-int dvb_usb_adapter_dvb_init(struct dvb_usb_adapter *adap, short *adapter_nums)
+int dvb_usb_adapter_dvb_init(struct dvb_usb_adapter *adap)
{
int i;
int ret = dvb_register_adapter(&adap->dvb_adap, adap->dev->desc->name,
adap->dev->props.owner,
&adap->dev->udev->dev,
- adapter_nums);
-
+ adap->dev->props.adapter_nr);
if (ret < 0) {
deb_info("dvb_register_adapter failed: error %d", ret);
goto err;
module_param_named(force_pid_filter_usage, dvb_usb_force_pid_filter_usage, int, 0444);
MODULE_PARM_DESC(force_pid_filter_usage, "force all dvb-usb-devices to use a PID filter, if any (default: 0).");
-static int dvb_usb_adapter_init(struct dvb_usb_device *d, short *adapter_nrs)
+static int dvb_usb_adapter_init(struct dvb_usb_device *d)
{
struct dvb_usb_adapter *adap;
int ret, n, o;
}
if ((ret = dvb_usb_adapter_stream_init(adap)) ||
- (ret = dvb_usb_adapter_dvb_init(adap, adapter_nrs)) ||
+ (ret = dvb_usb_adapter_dvb_init(adap)) ||
(ret = dvb_usb_adapter_frontend_init(adap))) {
return ret;
}
return 0;
}
-static int dvb_usb_init(struct dvb_usb_device *d, short *adapter_nums)
+static int dvb_usb_init(struct dvb_usb_device *d)
{
int ret = 0;
/* check the capabilities and set appropriate variables */
dvb_usb_device_power_ctrl(d, 1);
- if ((ret = dvb_usb_i2c_init(d)) ||
- (ret = dvb_usb_adapter_init(d, adapter_nums))) {
+ if ((ret = dvb_usb_i2c_init(d)) || (ret = dvb_usb_adapter_init(d))) {
dvb_usb_exit(d);
return ret;
}
* USB
*/
int dvb_usbv2_device_init(struct usb_interface *intf,
- const struct usb_device_id *id,
- short *adapter_nums)
+ const struct usb_device_id *id)
{
struct usb_device *udev = interface_to_usbdev(intf);
struct dvb_usb_device *d = NULL;
usb_set_intfdata(intf, d);
- ret = dvb_usb_init(d, adapter_nums);
+ ret = dvb_usb_init(d);
if (ret == 0)
info("%s successfully initialized and connected.", desc->name);