aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/usbip/stub_dev.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-05-21 00:12:25 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-05-21 00:12:25 -0400
commit19e36ad292ab24980db64a5ff17973d3118a8fb9 (patch)
tree175715409a689814e5cd425a98f2d2d47f82addf /drivers/usb/usbip/stub_dev.c
parente10abc629f38efd9b6936cf3612583cc846104d9 (diff)
parent60d5794fe5a50d02f4a0df84b45910a4dfa8b487 (diff)
Merge tag 'usb-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB updates from Greg KH: "Here's the big pull request for USB and PHY drivers for 4.7-rc1 Full details in the shortlog, but it's the normal major gadget driver updates, phy updates, new usbip code, as well as a bit of lots of other stuff. All have been in linux-next with no reported issues" * tag 'usb-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (164 commits) USB: serial: ti_usb_3410_5052: add MOXA UPORT 11x0 support USB: serial: fix minor-number allocation USB: serial: quatech2: fix use-after-free in probe error path USB: serial: mxuport: fix use-after-free in probe error path USB: serial: keyspan: fix debug and error messages USB: serial: keyspan: fix URB unlink USB: serial: keyspan: fix use-after-free in probe error path USB: serial: io_edgeport: fix memory leaks in probe error path USB: serial: io_edgeport: fix memory leaks in attach error path usb: Remove unnecessary space before operator ','. usb: Remove unnecessary space before open square bracket. USB: FHCI: avoid redundant condition usb: host: xhci-rcar: Avoid long wait in xhci_reset() usb/host/fotg210: remove dead code in create_sysfs_files usb: wusbcore: Do not initialise statics to 0. usb: wusbcore: Remove space before ',' and '(' . USB: serial: cp210x: clean up CRTSCTS flag code USB: serial: cp210x: get rid of magic numbers in CRTSCTS flag code USB: serial: cp210x: fix hardware flow-control disable USB: serial: option: add even more ZTE device ids ...
Diffstat (limited to 'drivers/usb/usbip/stub_dev.c')
-rw-r--r--drivers/usb/usbip/stub_dev.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/usbip/stub_dev.c b/drivers/usb/usbip/stub_dev.c
index a3ec49bdc1e6..c653ce533430 100644
--- a/drivers/usb/usbip/stub_dev.c
+++ b/drivers/usb/usbip/stub_dev.c
@@ -219,7 +219,7 @@ static void stub_device_reset(struct usbip_device *ud)
219 219
220 dev_dbg(&udev->dev, "device reset"); 220 dev_dbg(&udev->dev, "device reset");
221 221
222 ret = usb_lock_device_for_reset(udev, sdev->interface); 222 ret = usb_lock_device_for_reset(udev, NULL);
223 if (ret < 0) { 223 if (ret < 0) {
224 dev_err(&udev->dev, "lock for reset\n"); 224 dev_err(&udev->dev, "lock for reset\n");
225 spin_lock_irq(&ud->lock); 225 spin_lock_irq(&ud->lock);
@@ -252,7 +252,7 @@ static void stub_device_unusable(struct usbip_device *ud)
252 252
253/** 253/**
254 * stub_device_alloc - allocate a new stub_device struct 254 * stub_device_alloc - allocate a new stub_device struct
255 * @interface: usb_interface of a new device 255 * @udev: usb_device of a new device
256 * 256 *
257 * Allocates and initializes a new stub_device struct. 257 * Allocates and initializes a new stub_device struct.
258 */ 258 */
@@ -388,7 +388,6 @@ err_files:
388err_port: 388err_port:
389 dev_set_drvdata(&udev->dev, NULL); 389 dev_set_drvdata(&udev->dev, NULL);
390 usb_put_dev(udev); 390 usb_put_dev(udev);
391 kthread_stop_put(sdev->ud.eh);
392 391
393 busid_priv->sdev = NULL; 392 busid_priv->sdev = NULL;
394 stub_device_free(sdev); 393 stub_device_free(sdev);
@@ -449,7 +448,7 @@ static void stub_disconnect(struct usb_device *udev)
449 } 448 }
450 449
451 /* If usb reset is called from event handler */ 450 /* If usb reset is called from event handler */
452 if (busid_priv->sdev->ud.eh == current) 451 if (usbip_in_eh(current))
453 return; 452 return;
454 453
455 /* shutdown the current connection */ 454 /* shutdown the current connection */