aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/usbip/stub_dev.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2013-01-29 10:48:30 +0100
committerJiri Kosina <jkosina@suse.cz>2013-01-29 10:48:30 +0100
commit617677295b53a40d0e54aac4cbbc216ffbc755dd (patch)
tree51b9e87213243ed5efff252c8e8d8fec4eebc588 /drivers/staging/usbip/stub_dev.c
parenttime: x86: report_lost_ticks doesn't exist any more (diff)
parentMerge tag 'regulator-3.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator (diff)
downloadlinux-dev-617677295b53a40d0e54aac4cbbc216ffbc755dd.tar.xz
linux-dev-617677295b53a40d0e54aac4cbbc216ffbc755dd.zip
Merge branch 'master' into for-next
Conflicts: drivers/devfreq/exynos4_bus.c Sync with Linus' tree to be able to apply patches that are against newer code (mvneta).
Diffstat (limited to 'drivers/staging/usbip/stub_dev.c')
-rw-r--r--drivers/staging/usbip/stub_dev.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/staging/usbip/stub_dev.c b/drivers/staging/usbip/stub_dev.c
index c8d79a7f0e0e..ee36415eb26d 100644
--- a/drivers/staging/usbip/stub_dev.c
+++ b/drivers/staging/usbip/stub_dev.c
@@ -18,6 +18,7 @@
*/
#include <linux/device.h>
+#include <linux/file.h>
#include <linux/kthread.h>
#include <linux/module.h>
@@ -203,7 +204,7 @@ static void stub_shutdown_connection(struct usbip_device *ud)
* not touch NULL socket.
*/
if (ud->tcp_socket) {
- sock_release(ud->tcp_socket);
+ fput(ud->tcp_socket->file);
ud->tcp_socket = NULL;
}
@@ -432,6 +433,8 @@ static int stub_probe(struct usb_interface *interface,
dev_err(&interface->dev, "stub_add_files for %s\n", udev_busid);
usb_set_intfdata(interface, NULL);
usb_put_intf(interface);
+ usb_put_dev(udev);
+ kthread_stop_put(sdev->ud.eh);
busid_priv->interf_count = 0;
busid_priv->sdev = NULL;
@@ -477,19 +480,17 @@ static void stub_disconnect(struct usb_interface *interface)
/* get stub_device */
if (!sdev) {
dev_err(&interface->dev, "could not get device");
- /* BUG(); */
return;
}
usb_set_intfdata(interface, NULL);
/*
- * NOTE:
- * rx/tx threads are invoked for each usb_device.
+ * NOTE: rx/tx threads are invoked for each usb_device.
*/
stub_remove_files(&interface->dev);
- /*If usb reset called from event handler*/
+ /* If usb reset is called from event handler */
if (busid_priv->sdev->ud.eh == current) {
busid_priv->interf_count--;
return;
@@ -504,13 +505,13 @@ static void stub_disconnect(struct usb_interface *interface)
busid_priv->interf_count = 0;
- /* 1. shutdown the current connection */
+ /* shutdown the current connection */
shutdown_busid(busid_priv);
usb_put_dev(sdev->udev);
usb_put_intf(interface);
- /* 3. free sdev */
+ /* free sdev */
busid_priv->sdev = NULL;
stub_device_free(sdev);