diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-04 14:23:41 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-04 14:23:41 -0700 |
commit | 5895198c56d131cc696556a45f7ff0ea99ac297b (patch) | |
tree | 26b98358ece87f30b8788603fee48bc9a3a71728 /drivers/staging/usbip | |
parent | 0ecb063a2976b62d5eaecbd5a70bb994fe4b5a8a (diff) | |
parent | 9005fcd89c24f2a0fa6f87588b9208aae6d4d6cd (diff) | |
download | kernel_samsung_smdk4412-5895198c56d131cc696556a45f7ff0ea99ac297b.zip kernel_samsung_smdk4412-5895198c56d131cc696556a45f7ff0ea99ac297b.tar.gz kernel_samsung_smdk4412-5895198c56d131cc696556a45f7ff0ea99ac297b.tar.bz2 |
Merge branch 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6:
staging: Remove a warning for drivers/staging/wlan-ng/cfg80211.c
staging: intel_sst: intelmid needs delay.h
staging: solo6x10: add select SND_PCM to fix build error
staging: usbip: vhci: fix oops on subsequent attach
staging: ft1000: Remove unnecessary EXPORT_SYMBOLs
staging: rts_pstor: use #ifdef instead of #if
staging: rts_pstor: Add <linux/vmalloc.h>
staging: gma500: Depend on X86
staging: olpc: Add <linux/delay.h>
Diffstat (limited to 'drivers/staging/usbip')
-rw-r--r-- | drivers/staging/usbip/vhci_hcd.c | 9 | ||||
-rw-r--r-- | drivers/staging/usbip/vhci_sysfs.c | 7 |
2 files changed, 8 insertions, 8 deletions
diff --git a/drivers/staging/usbip/vhci_hcd.c b/drivers/staging/usbip/vhci_hcd.c index 5d0caa8..4f4f133 100644 --- a/drivers/staging/usbip/vhci_hcd.c +++ b/drivers/staging/usbip/vhci_hcd.c @@ -876,8 +876,10 @@ static void vhci_shutdown_connection(struct usbip_device *ud) } /* kill threads related to this sdev, if v.c. exists */ - kthread_stop(vdev->ud.tcp_rx); - kthread_stop(vdev->ud.tcp_tx); + if (vdev->ud.tcp_rx) + kthread_stop(vdev->ud.tcp_rx); + if (vdev->ud.tcp_tx) + kthread_stop(vdev->ud.tcp_tx); usbip_uinfo("stop threads\n"); @@ -949,9 +951,6 @@ static void vhci_device_init(struct vhci_device *vdev) { memset(vdev, 0, sizeof(*vdev)); - vdev->ud.tcp_rx = kthread_create(vhci_rx_loop, &vdev->ud, "vhci_rx"); - vdev->ud.tcp_tx = kthread_create(vhci_tx_loop, &vdev->ud, "vhci_tx"); - vdev->ud.side = USBIP_VHCI; vdev->ud.status = VDEV_ST_NULL; /* vdev->ud.lock = SPIN_LOCK_UNLOCKED; */ diff --git a/drivers/staging/usbip/vhci_sysfs.c b/drivers/staging/usbip/vhci_sysfs.c index 3f2459f..e2dadbd 100644 --- a/drivers/staging/usbip/vhci_sysfs.c +++ b/drivers/staging/usbip/vhci_sysfs.c @@ -21,6 +21,7 @@ #include "vhci.h" #include <linux/in.h> +#include <linux/kthread.h> /* TODO: refine locking ?*/ @@ -220,13 +221,13 @@ static ssize_t store_attach(struct device *dev, struct device_attribute *attr, vdev->ud.tcp_socket = socket; vdev->ud.status = VDEV_ST_NOTASSIGNED; - wake_up_process(vdev->ud.tcp_rx); - wake_up_process(vdev->ud.tcp_tx); - spin_unlock(&vdev->ud.lock); spin_unlock(&the_controller->lock); /* end the lock */ + vdev->ud.tcp_rx = kthread_run(vhci_rx_loop, &vdev->ud, "vhci_rx"); + vdev->ud.tcp_tx = kthread_run(vhci_tx_loop, &vdev->ud, "vhci_tx"); + rh_port_connect(rhport, speed); return count; |