diff options
-rw-r--r-- | linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c b/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c index a77a6df69..b0dbab361 100644 --- a/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c +++ b/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c @@ -1025,7 +1025,9 @@ static int ttusb_stop_feed(struct dvb_demux_feed *dvbdmxfeed) static int ttusb_setup_interfaces(struct ttusb *ttusb) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) usb_set_configuration(ttusb->dev, 1); +#endif usb_set_interface(ttusb->dev, 1, 1); ttusb->bulk_out_pipe = usb_sndbulkpipe(ttusb->dev, 1); @@ -1110,6 +1112,8 @@ static int ttusb_probe(struct usb_interface *intf, const struct usb_device_id *i udev = interface_to_usbdev(intf); + if (intf->altsettings->desc.bInterfaceNumber != 1) return -ENODEV; + if (!(ttusb = kmalloc(sizeof(struct ttusb), GFP_KERNEL))) return -ENOMEM; |