aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/class
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-16 23:42:46 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-16 23:42:46 -0400
commit2bcb132c693566bcb8208cc7ce66b72a4f852ecf (patch)
tree6fc4f05ce18140d86aa78a10380a610734aeaef9 /drivers/usb/class
parent67e6da702753dac8f0540209dded80a0c4e60d81 (diff)
parent5698bd757d55b1bb87edd1a9744ab09c142abfc2 (diff)
Merge 3.6-rc6 into usb-next
This resolves the merge problems with: drivers/usb/dwc3/gadget.c drivers/usb/musb/tusb6010.c that had been seen in linux-next. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/class')
-rw-r--r--drivers/usb/class/cdc-wdm.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
index 65a55abb791f..5f0cb417b736 100644
--- a/drivers/usb/class/cdc-wdm.c
+++ b/drivers/usb/class/cdc-wdm.c
@@ -109,12 +109,14 @@ static struct usb_driver wdm_driver;
109/* return intfdata if we own the interface, else look up intf in the list */ 109/* return intfdata if we own the interface, else look up intf in the list */
110static struct wdm_device *wdm_find_device(struct usb_interface *intf) 110static struct wdm_device *wdm_find_device(struct usb_interface *intf)
111{ 111{
112 struct wdm_device *desc = NULL; 112 struct wdm_device *desc;
113 113
114 spin_lock(&wdm_device_list_lock); 114 spin_lock(&wdm_device_list_lock);
115 list_for_each_entry(desc, &wdm_device_list, device_list) 115 list_for_each_entry(desc, &wdm_device_list, device_list)
116 if (desc->intf == intf) 116 if (desc->intf == intf)
117 break; 117 goto found;
118 desc = NULL;
119found:
118 spin_unlock(&wdm_device_list_lock); 120 spin_unlock(&wdm_device_list_lock);
119 121
120 return desc; 122 return desc;
@@ -122,12 +124,14 @@ static struct wdm_device *wdm_find_device(struct usb_interface *intf)
122 124
123static struct wdm_device *wdm_find_device_by_minor(int minor) 125static struct wdm_device *wdm_find_device_by_minor(int minor)
124{ 126{
125 struct wdm_device *desc = NULL; 127 struct wdm_device *desc;
126 128
127 spin_lock(&wdm_device_list_lock); 129 spin_lock(&wdm_device_list_lock);
128 list_for_each_entry(desc, &wdm_device_list, device_list) 130 list_for_each_entry(desc, &wdm_device_list, device_list)
129 if (desc->intf->minor == minor) 131 if (desc->intf->minor == minor)
130 break; 132 goto found;
133 desc = NULL;
134found:
131 spin_unlock(&wdm_device_list_lock); 135 spin_unlock(&wdm_device_list_lock);
132 136
133 return desc; 137 return desc;