aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/usbip/usbip_common.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2011-03-02 00:13:05 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2011-03-02 16:03:59 -0500
commit9720b4bc76a83807c68e00c62bfba575251bb73e (patch)
tree41794e9b5f715bf5ee52d428cadcf70ac773347b /drivers/staging/usbip/usbip_common.h
parent8c81161615feb8c666c675ec7a660dc9b011683f (diff)
staging/usbip: convert to kthread
usbip has its own infrastructure for managing kernel threads, similar to kthread. By changing it to use the standard functions, we can simplify the code and get rid of one of the last BKL users at the same time. Includes changes suggested by Max Vozeler. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Greg Kroah-Hartman <gregkh@suse.de> Cc: Takahiro Hirofuchi <hirofuchi@users.sourceforge.net> Cc: Max Vozeler <max@vozeler.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/usbip/usbip_common.h')
-rw-r--r--drivers/staging/usbip/usbip_common.h20
1 files changed, 3 insertions, 17 deletions
diff --git a/drivers/staging/usbip/usbip_common.h b/drivers/staging/usbip/usbip_common.h
index d280e234e06..9f809c315d9 100644
--- a/drivers/staging/usbip/usbip_common.h
+++ b/drivers/staging/usbip/usbip_common.h
@@ -307,13 +307,6 @@ void usbip_dump_header(struct usbip_header *pdu);
struct usbip_device;
-struct usbip_task {
- struct task_struct *thread;
- struct completion thread_done;
- char *name;
- void (*loop_ops)(struct usbip_task *);
-};
-
enum usbip_side {
USBIP_VHCI,
USBIP_STUB,
@@ -346,8 +339,8 @@ struct usbip_device {
struct socket *tcp_socket;
- struct usbip_task tcp_rx;
- struct usbip_task tcp_tx;
+ struct task_struct *tcp_rx;
+ struct task_struct *tcp_tx;
/* event handler */
#define USBIP_EH_SHUTDOWN (1 << 0)
@@ -367,7 +360,7 @@ struct usbip_device {
#define VDEV_EVENT_ERROR_MALLOC (USBIP_EH_SHUTDOWN | USBIP_EH_UNUSABLE)
unsigned long event;
- struct usbip_task eh;
+ struct task_struct *eh;
wait_queue_head_t eh_waitq;
struct eh_ops {
@@ -378,13 +371,6 @@ struct usbip_device {
};
-void usbip_task_init(struct usbip_task *ut, char *,
- void (*loop_ops)(struct usbip_task *));
-
-int usbip_start_threads(struct usbip_device *ud);
-void usbip_stop_threads(struct usbip_device *ud);
-int usbip_thread(void *param);
-
void usbip_pack_pdu(struct usbip_header *pdu, struct urb *urb, int cmd,
int pack);