mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 01:21:58 +00:00
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>
This commit is contained in:
parent
3fc154b6b8
commit
ed76cacbea
2 changed files with 14 additions and 25 deletions
|
@ -144,6 +144,7 @@ struct us_data {
|
|||
unsigned char *sensebuf; /* sense data buffer */
|
||||
dma_addr_t cr_dma; /* buffer DMA addresses */
|
||||
dma_addr_t iobuf_dma;
|
||||
struct task_struct *ctl_thread; /* the control thread */
|
||||
|
||||
/* mutual exclusion and synchronization structures */
|
||||
struct semaphore sema; /* to sleep thread on */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue