diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2007-06-07 17:12:25 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-07-12 19:34:31 -0400 |
commit | ed76cacbea08ebfdb678c8687f98237cb7c67bb6 (patch) | |
tree | bb3c3f759e36d1ae3c6c5b422ec74304e4ce2502 /drivers/usb/storage/usb.h | |
parent | 3fc154b6b8134b98bb94d60cad9a46ec1ffbe372 (diff) |
USB: usb-storage: use kthread_stop() for the control thread
This patch (as923) makes usb-storage's control thread use
kthread_should_stop()/kthread_stop(). The scanning thread can't be
similarly converted until the core kthread implementation allows
threads to call do_exit().
The advantage of this change is that we can now be certain the control
thread has terminated before storage_disconnect() returns. This will
simplify the locking requirements when autosuspend support is added.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/storage/usb.h')
-rw-r--r-- | drivers/usb/storage/usb.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/storage/usb.h b/drivers/usb/storage/usb.h index 6dac1ffdde86..6445665b1577 100644 --- a/drivers/usb/storage/usb.h +++ b/drivers/usb/storage/usb.h | |||
@@ -144,6 +144,7 @@ struct us_data { | |||
144 | unsigned char *sensebuf; /* sense data buffer */ | 144 | unsigned char *sensebuf; /* sense data buffer */ |
145 | dma_addr_t cr_dma; /* buffer DMA addresses */ | 145 | dma_addr_t cr_dma; /* buffer DMA addresses */ |
146 | dma_addr_t iobuf_dma; | 146 | dma_addr_t iobuf_dma; |
147 | struct task_struct *ctl_thread; /* the control thread */ | ||
147 | 148 | ||
148 | /* mutual exclusion and synchronization structures */ | 149 | /* mutual exclusion and synchronization structures */ |
149 | struct semaphore sema; /* to sleep thread on */ | 150 | struct semaphore sema; /* to sleep thread on */ |