aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2007-10-17 02:26:13 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-17 11:42:47 -0400
commit04fc8bbcf5eb25fa2aec290b302a9878dde20168 (patch)
tree4c650a7d30d921e519f51b74f1dc591cf93e7b0b /drivers/usb/storage
parent4029a9177fb4a3410211d091505a7f8d03a7b15d (diff)
kill DECLARE_MUTEX_LOCKED
DECLARE_MUTEX_LOCKED was used for semaphores used as completions and we've got rid of them. Well, except for one in libusual that the maintainer explicitly wants to keep as semaphore. So convert that useage to an explicit sema_init and kill of DECLARE_MUTEX_LOCKED so that new code is reminded to use a completion. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: "Satyam Sharma" <satyam.sharma@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/usb/storage')
-rw-r--r--drivers/usb/storage/libusual.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/storage/libusual.c b/drivers/usb/storage/libusual.c
index 06d1107dbd47..55b952084f0c 100644
--- a/drivers/usb/storage/libusual.c
+++ b/drivers/usb/storage/libusual.c
@@ -30,7 +30,7 @@ static atomic_t usu_bias = ATOMIC_INIT(USB_US_DEFAULT_BIAS);
30#define BIAS_NAME_SIZE (sizeof("usb-storage")) 30#define BIAS_NAME_SIZE (sizeof("usb-storage"))
31static const char *bias_names[3] = { "none", "usb-storage", "ub" }; 31static const char *bias_names[3] = { "none", "usb-storage", "ub" };
32 32
33static DECLARE_MUTEX_LOCKED(usu_init_notify); 33static struct semaphore usu_init_notify;
34static DECLARE_COMPLETION(usu_end_notify); 34static DECLARE_COMPLETION(usu_end_notify);
35static atomic_t total_threads = ATOMIC_INIT(0); 35static atomic_t total_threads = ATOMIC_INIT(0);
36 36
@@ -204,6 +204,8 @@ static int __init usb_usual_init(void)
204{ 204{
205 int rc; 205 int rc;
206 206
207 sema_init(&usu_init_notify, 0);
208
207 rc = usb_register(&usu_driver); 209 rc = usb_register(&usu_driver);
208 up(&usu_init_notify); 210 up(&usu_init_notify);
209 return rc; 211 return rc;