Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 322723
b: refs/heads/master
c: 6a44886
h: refs/heads/master
i:
  322721: dbe3a8d
  322719: ee6aa8a
v: v3
  • Loading branch information
Bjørn Mork authored and Greg Kroah-Hartman committed Sep 10, 2012
1 parent 5a3b8e6 commit a3d6893
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 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: f08dea734844aa42ec57c229b0b73b3d7d21f810
refs/heads/master: 6a44886899ef8cc396e230e492e6a56a883889f3
12 changes: 8 additions & 4 deletions trunk/drivers/usb/class/cdc-wdm.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,25 +109,29 @@ static struct usb_driver wdm_driver;
/* return intfdata if we own the interface, else look up intf in the list */
static struct wdm_device *wdm_find_device(struct usb_interface *intf)
{
struct wdm_device *desc = NULL;
struct wdm_device *desc;

spin_lock(&wdm_device_list_lock);
list_for_each_entry(desc, &wdm_device_list, device_list)
if (desc->intf == intf)
break;
goto found;
desc = NULL;
found:
spin_unlock(&wdm_device_list_lock);

return desc;
}

static struct wdm_device *wdm_find_device_by_minor(int minor)
{
struct wdm_device *desc = NULL;
struct wdm_device *desc;

spin_lock(&wdm_device_list_lock);
list_for_each_entry(desc, &wdm_device_list, device_list)
if (desc->intf->minor == minor)
break;
goto found;
desc = NULL;
found:
spin_unlock(&wdm_device_list_lock);

return desc;
Expand Down

0 comments on commit a3d6893

Please sign in to comment.