Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 306441
b: refs/heads/master
c: 943a903
h: refs/heads/master
i:
  306439: 75de08f
v: v3
  • Loading branch information
Antti Palosaari authored and Mauro Carvalho Chehab committed May 15, 2012
1 parent 93d655f commit 0bc50ef
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 662f9602bdea183456c49260e3bd2edfad4be471
refs/heads/master: 943a903459db81a07c3af703605d4eb6fb64b523
25 changes: 25 additions & 0 deletions trunk/drivers/media/dvb/dvb-usb/rtl28xxu.c
Original file line number Diff line number Diff line change
Expand Up @@ -909,13 +909,38 @@ static int rtl28xxu_probe(struct usb_interface *intf,
int ret, i;
int properties_count = ARRAY_SIZE(rtl28xxu_properties);
struct dvb_usb_device *d;
struct usb_device *udev;
bool found;

deb_info("%s: interface=%d\n", __func__,
intf->cur_altsetting->desc.bInterfaceNumber);

if (intf->cur_altsetting->desc.bInterfaceNumber != 0)
return 0;

/* Dynamic USB ID support. Replaces first device ID with current one .*/
udev = interface_to_usbdev(intf);

for (i = 0, found = false; i < ARRAY_SIZE(rtl28xxu_table) - 1; i++) {
if (rtl28xxu_table[i].idVendor ==
le16_to_cpu(udev->descriptor.idVendor) &&
rtl28xxu_table[i].idProduct ==
le16_to_cpu(udev->descriptor.idProduct)) {
found = true;
break;
}
}

if (!found) {
deb_info("%s: using dynamic ID %04x:%04x\n", __func__,
le16_to_cpu(udev->descriptor.idVendor),
le16_to_cpu(udev->descriptor.idProduct));
rtl28xxu_properties[0].devices[0].warm_ids[0]->idVendor =
le16_to_cpu(udev->descriptor.idVendor);
rtl28xxu_properties[0].devices[0].warm_ids[0]->idProduct =
le16_to_cpu(udev->descriptor.idProduct);
}

for (i = 0; i < properties_count; i++) {
ret = dvb_usb_device_init(intf, &rtl28xxu_properties[i],
THIS_MODULE, &d, adapter_nr);
Expand Down

0 comments on commit 0bc50ef

Please sign in to comment.