Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 367084
b: refs/heads/master
c: f7d141b
h: refs/heads/master
v: v3
  • Loading branch information
Kevin Baradon authored and Mauro Carvalho Chehab committed Apr 23, 2013
1 parent 3170071 commit 44e32f9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c06ca8f92b0b23dfd209fea27d71046c9c776910
refs/heads/master: f7d141b312702d33449809b823894c486e6d9770
13 changes: 7 additions & 6 deletions trunk/drivers/media/rc/imon.c
Original file line number Diff line number Diff line change
Expand Up @@ -2093,7 +2093,8 @@ static bool imon_find_endpoints(struct imon_context *ictx,

}

static struct imon_context *imon_init_intf0(struct usb_interface *intf)
static struct imon_context *imon_init_intf0(struct usb_interface *intf,
const struct usb_device_id *id)
{
struct imon_context *ictx;
struct urb *rx_urb;
Expand Down Expand Up @@ -2133,6 +2134,10 @@ static struct imon_context *imon_init_intf0(struct usb_interface *intf)
ictx->vendor = le16_to_cpu(ictx->usbdev_intf0->descriptor.idVendor);
ictx->product = le16_to_cpu(ictx->usbdev_intf0->descriptor.idProduct);

/* default send_packet delay is 5ms but some devices need more */
ictx->send_packet_delay = id->driver_info & IMON_NEED_20MS_PKT_DELAY ?
20 : 5;

ret = -ENODEV;
iface_desc = intf->cur_altsetting;
if (!imon_find_endpoints(ictx, iface_desc)) {
Expand Down Expand Up @@ -2311,7 +2316,7 @@ static int imon_probe(struct usb_interface *interface,
first_if_ctx = usb_get_intfdata(first_if);

if (ifnum == 0) {
ictx = imon_init_intf0(interface);
ictx = imon_init_intf0(interface, id);
if (!ictx) {
pr_err("failed to initialize context!\n");
ret = -ENODEV;
Expand All @@ -2329,10 +2334,6 @@ static int imon_probe(struct usb_interface *interface,

}

/* default send_packet delay is 5ms but some devices need more */
ictx->send_packet_delay = id->driver_info & IMON_NEED_20MS_PKT_DELAY ?
20 : 5;

usb_set_intfdata(interface, ictx);

if (ifnum == 0) {
Expand Down

0 comments on commit 44e32f9

Please sign in to comment.