From ed76cacbea08ebfdb678c8687f98237cb7c67bb6 Mon Sep 17 00:00:00 2001 From: Alan Stern Date: Thu, 7 Jun 2007 17:12:25 -0400 Subject: 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 Signed-off-by: Matthew Dharm Signed-off-by: Greg Kroah-Hartman --- drivers/usb/storage/usb.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/usb/storage/usb.h') diff --git a/drivers/usb/storage/usb.h b/drivers/usb/storage/usb.h index 6dac1ffdde8..6445665b157 100644 --- a/drivers/usb/storage/usb.h +++ b/drivers/usb/storage/usb.h @@ -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 */ -- cgit v1.2.3