summaryrefslogtreecommitdiff
path: root/drivers/staging/usbip/vhci_rx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/usbip/vhci_rx.c')
-rw-r--r--drivers/staging/usbip/vhci_rx.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/staging/usbip/vhci_rx.c b/drivers/staging/usbip/vhci_rx.c
index bf69914..09bf235 100644
--- a/drivers/staging/usbip/vhci_rx.c
+++ b/drivers/staging/usbip/vhci_rx.c
@@ -18,6 +18,7 @@
*/
#include <linux/slab.h>
+#include <linux/kthread.h>
#include "usbip_common.h"
#include "vhci.h"
@@ -269,22 +270,17 @@ static void vhci_rx_pdu(struct usbip_device *ud)
/*-------------------------------------------------------------------------*/
-void vhci_rx_loop(struct usbip_task *ut)
+int vhci_rx_loop(void *data)
{
- struct usbip_device *ud = container_of(ut, struct usbip_device, tcp_rx);
-
-
- while (1) {
- if (signal_pending(current)) {
- usbip_dbg_vhci_rx("signal catched!\n");
- break;
- }
+ struct usbip_device *ud = data;
+ while (!kthread_should_stop()) {
if (usbip_event_happened(ud))
break;
vhci_rx_pdu(ud);
}
-}
+ return 0;
+}