From 04fc8bbcf5eb25fa2aec290b302a9878dde20168 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Tue, 16 Oct 2007 23:26:13 -0700 Subject: 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 Acked-by: "Satyam Sharma" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/usb/storage/libusual.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers/usb') 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); #define BIAS_NAME_SIZE (sizeof("usb-storage")) static const char *bias_names[3] = { "none", "usb-storage", "ub" }; -static DECLARE_MUTEX_LOCKED(usu_init_notify); +static struct semaphore usu_init_notify; static DECLARE_COMPLETION(usu_end_notify); static atomic_t total_threads = ATOMIC_INIT(0); @@ -204,6 +204,8 @@ static int __init usb_usual_init(void) { int rc; + sema_init(&usu_init_notify, 0); + rc = usb_register(&usu_driver); up(&usu_init_notify); return rc; -- cgit v1.2.3