aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/usbip/vhci_hcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/usbip/vhci_hcd.c')
-rw-r--r--drivers/staging/usbip/vhci_hcd.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/staging/usbip/vhci_hcd.c b/drivers/staging/usbip/vhci_hcd.c
index 0f02a4b12ae..4f4f13321f4 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)
876 } 876 }
877 877
878 /* kill threads related to this sdev, if v.c. exists */ 878 /* kill threads related to this sdev, if v.c. exists */
879 kthread_stop(vdev->ud.tcp_rx); 879 if (vdev->ud.tcp_rx)
880 kthread_stop(vdev->ud.tcp_tx); 880 kthread_stop(vdev->ud.tcp_rx);
881 if (vdev->ud.tcp_tx)
882 kthread_stop(vdev->ud.tcp_tx);
881 883
882 usbip_uinfo("stop threads\n"); 884 usbip_uinfo("stop threads\n");
883 885
@@ -949,9 +951,6 @@ static void vhci_device_init(struct vhci_device *vdev)
949{ 951{
950 memset(vdev, 0, sizeof(*vdev)); 952 memset(vdev, 0, sizeof(*vdev));
951 953
952 vdev->ud.tcp_rx = kthread_create(vhci_rx_loop, &vdev->ud, "vhci_rx");
953 vdev->ud.tcp_tx = kthread_create(vhci_tx_loop, &vdev->ud, "vhci_tx");
954
955 vdev->ud.side = USBIP_VHCI; 954 vdev->ud.side = USBIP_VHCI;
956 vdev->ud.status = VDEV_ST_NULL; 955 vdev->ud.status = VDEV_ST_NULL;
957 /* vdev->ud.lock = SPIN_LOCK_UNLOCKED; */ 956 /* vdev->ud.lock = SPIN_LOCK_UNLOCKED; */
@@ -1139,7 +1138,7 @@ static int vhci_hcd_probe(struct platform_device *pdev)
1139 usbip_uerr("create hcd failed\n"); 1138 usbip_uerr("create hcd failed\n");
1140 return -ENOMEM; 1139 return -ENOMEM;
1141 } 1140 }
1142 1141 hcd->has_tt = 1;
1143 1142
1144 /* this is private data for vhci_hcd */ 1143 /* this is private data for vhci_hcd */
1145 the_controller = hcd_to_vhci(hcd); 1144 the_controller = hcd_to_vhci(hcd);