diff options
author | Christoph Hellwig <hch@lst.de> | 2007-10-16 23:26:13 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-17 08:42:47 -0700 |
commit | 04fc8bbcf5eb25fa2aec290b302a9878dde20168 (patch) | |
tree | 4c650a7d30d921e519f51b74f1dc591cf93e7b0b | |
parent | 4029a9177fb4a3410211d091505a7f8d03a7b15d (diff) | |
download | op-kernel-dev-04fc8bbcf5eb25fa2aec290b302a9878dde20168.zip op-kernel-dev-04fc8bbcf5eb25fa2aec290b302a9878dde20168.tar.gz |
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>
-rw-r--r-- | drivers/usb/storage/libusual.c | 4 | ||||
-rw-r--r-- | include/asm-alpha/semaphore.h | 1 | ||||
-rw-r--r-- | include/asm-arm/semaphore.h | 1 | ||||
-rw-r--r-- | include/asm-avr32/semaphore.h | 1 | ||||
-rw-r--r-- | include/asm-blackfin/semaphore.h | 1 | ||||
-rw-r--r-- | include/asm-cris/semaphore.h | 1 | ||||
-rw-r--r-- | include/asm-frv/semaphore.h | 1 | ||||
-rw-r--r-- | include/asm-h8300/semaphore.h | 1 | ||||
-rw-r--r-- | include/asm-ia64/semaphore.h | 1 | ||||
-rw-r--r-- | include/asm-m32r/semaphore.h | 1 | ||||
-rw-r--r-- | include/asm-m68k/semaphore.h | 1 | ||||
-rw-r--r-- | include/asm-m68knommu/semaphore.h | 1 | ||||
-rw-r--r-- | include/asm-mips/semaphore.h | 1 | ||||
-rw-r--r-- | include/asm-parisc/semaphore.h | 1 | ||||
-rw-r--r-- | include/asm-powerpc/semaphore.h | 1 | ||||
-rw-r--r-- | include/asm-s390/semaphore.h | 1 | ||||
-rw-r--r-- | include/asm-sh/semaphore.h | 1 | ||||
-rw-r--r-- | include/asm-sh64/semaphore.h | 1 | ||||
-rw-r--r-- | include/asm-sparc/semaphore.h | 1 | ||||
-rw-r--r-- | include/asm-sparc64/semaphore.h | 1 | ||||
-rw-r--r-- | include/asm-v850/semaphore.h | 1 | ||||
-rw-r--r-- | include/asm-x86/semaphore_32.h | 1 | ||||
-rw-r--r-- | include/asm-x86/semaphore_64.h | 1 | ||||
-rw-r--r-- | include/asm-xtensa/semaphore.h | 1 |
24 files changed, 3 insertions, 24 deletions
diff --git a/drivers/usb/storage/libusual.c b/drivers/usb/storage/libusual.c index 06d1107..55b9520 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; diff --git a/include/asm-alpha/semaphore.h b/include/asm-alpha/semaphore.h index 1a6295f..f1e9278 100644 --- a/include/asm-alpha/semaphore.h +++ b/include/asm-alpha/semaphore.h @@ -30,7 +30,6 @@ struct semaphore { struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) -#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0) static inline void sema_init(struct semaphore *sem, int val) { diff --git a/include/asm-arm/semaphore.h b/include/asm-arm/semaphore.h index d5dc624..1c8b441 100644 --- a/include/asm-arm/semaphore.h +++ b/include/asm-arm/semaphore.h @@ -28,7 +28,6 @@ struct semaphore { struct semaphore name = __SEMAPHORE_INIT(name,count) #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) -#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0) static inline void sema_init(struct semaphore *sem, int val) { diff --git a/include/asm-avr32/semaphore.h b/include/asm-avr32/semaphore.h index ef99ddc..feaf1d4 100644 --- a/include/asm-avr32/semaphore.h +++ b/include/asm-avr32/semaphore.h @@ -36,7 +36,6 @@ struct semaphore { struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) -#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0) static inline void sema_init (struct semaphore *sem, int val) { diff --git a/include/asm-blackfin/semaphore.h b/include/asm-blackfin/semaphore.h index 94c04d7..533f90f 100644 --- a/include/asm-blackfin/semaphore.h +++ b/include/asm-blackfin/semaphore.h @@ -35,7 +35,6 @@ struct semaphore { struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) -#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0) static inline void sema_init(struct semaphore *sem, int val) { diff --git a/include/asm-cris/semaphore.h b/include/asm-cris/semaphore.h index 53f548b..31a4ac4 100644 --- a/include/asm-cris/semaphore.h +++ b/include/asm-cris/semaphore.h @@ -35,7 +35,6 @@ struct semaphore { struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) -#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0) static inline void sema_init(struct semaphore *sem, int val) { diff --git a/include/asm-frv/semaphore.h b/include/asm-frv/semaphore.h index 0958652..d7aaa19 100644 --- a/include/asm-frv/semaphore.h +++ b/include/asm-frv/semaphore.h @@ -49,7 +49,6 @@ struct semaphore { struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) -#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0) static inline void sema_init (struct semaphore *sem, int val) { diff --git a/include/asm-h8300/semaphore.h b/include/asm-h8300/semaphore.h index 81bae2a..f3ffff8 100644 --- a/include/asm-h8300/semaphore.h +++ b/include/asm-h8300/semaphore.h @@ -39,7 +39,6 @@ struct semaphore { struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) -#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0) static inline void sema_init (struct semaphore *sem, int val) { diff --git a/include/asm-ia64/semaphore.h b/include/asm-ia64/semaphore.h index f483eeb..d8393d1 100644 --- a/include/asm-ia64/semaphore.h +++ b/include/asm-ia64/semaphore.h @@ -28,7 +28,6 @@ struct semaphore { struct semaphore name = __SEMAPHORE_INITIALIZER(name, count) #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name, 1) -#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name, 0) static inline void sema_init (struct semaphore *sem, int val) diff --git a/include/asm-m32r/semaphore.h b/include/asm-m32r/semaphore.h index 41e45d7..b5bf95a 100644 --- a/include/asm-m32r/semaphore.h +++ b/include/asm-m32r/semaphore.h @@ -35,7 +35,6 @@ struct semaphore { struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) -#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0) static inline void sema_init (struct semaphore *sem, int val) { diff --git a/include/asm-m68k/semaphore.h b/include/asm-m68k/semaphore.h index fd4c7cc..64d6b11 100644 --- a/include/asm-m68k/semaphore.h +++ b/include/asm-m68k/semaphore.h @@ -40,7 +40,6 @@ struct semaphore { struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) -#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0) static inline void sema_init(struct semaphore *sem, int val) { diff --git a/include/asm-m68knommu/semaphore.h b/include/asm-m68knommu/semaphore.h index 5cc1fdd..5779eb6 100644 --- a/include/asm-m68knommu/semaphore.h +++ b/include/asm-m68knommu/semaphore.h @@ -39,7 +39,6 @@ struct semaphore { struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) -#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0) static inline void sema_init (struct semaphore *sem, int val) { diff --git a/include/asm-mips/semaphore.h b/include/asm-mips/semaphore.h index 080daa7..fdf8042b 100644 --- a/include/asm-mips/semaphore.h +++ b/include/asm-mips/semaphore.h @@ -49,7 +49,6 @@ struct semaphore { struct semaphore name = __SEMAPHORE_INITIALIZER(name, count) #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name, 1) -#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name, 0) static inline void sema_init(struct semaphore *sem, int val) { diff --git a/include/asm-parisc/semaphore.h b/include/asm-parisc/semaphore.h index d45827a..b771dcf 100644 --- a/include/asm-parisc/semaphore.h +++ b/include/asm-parisc/semaphore.h @@ -53,7 +53,6 @@ struct semaphore { struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) -#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0) extern inline void sema_init (struct semaphore *sem, int val) { diff --git a/include/asm-powerpc/semaphore.h b/include/asm-powerpc/semaphore.h index 57369d2..48dd32e 100644 --- a/include/asm-powerpc/semaphore.h +++ b/include/asm-powerpc/semaphore.h @@ -35,7 +35,6 @@ struct semaphore { struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name, 1) -#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name, 0) static inline void sema_init (struct semaphore *sem, int val) { diff --git a/include/asm-s390/semaphore.h b/include/asm-s390/semaphore.h index dbce058..0e7001a 100644 --- a/include/asm-s390/semaphore.h +++ b/include/asm-s390/semaphore.h @@ -33,7 +33,6 @@ struct semaphore { struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) -#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0) static inline void sema_init (struct semaphore *sem, int val) { diff --git a/include/asm-sh/semaphore.h b/include/asm-sh/semaphore.h index 489f784..9e5a37c 100644 --- a/include/asm-sh/semaphore.h +++ b/include/asm-sh/semaphore.h @@ -37,7 +37,6 @@ struct semaphore { struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) -#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0) static inline void sema_init (struct semaphore *sem, int val) { diff --git a/include/asm-sh64/semaphore.h b/include/asm-sh64/semaphore.h index 4695264..f027cc1 100644 --- a/include/asm-sh64/semaphore.h +++ b/include/asm-sh64/semaphore.h @@ -44,7 +44,6 @@ struct semaphore { struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) -#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0) static inline void sema_init (struct semaphore *sem, int val) { diff --git a/include/asm-sparc/semaphore.h b/include/asm-sparc/semaphore.h index f74ba31..8018f9f 100644 --- a/include/asm-sparc/semaphore.h +++ b/include/asm-sparc/semaphore.h @@ -26,7 +26,6 @@ struct semaphore { struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) -#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0) static inline void sema_init (struct semaphore *sem, int val) { diff --git a/include/asm-sparc64/semaphore.h b/include/asm-sparc64/semaphore.h index 093dcc6..7f7c0c4 100644 --- a/include/asm-sparc64/semaphore.h +++ b/include/asm-sparc64/semaphore.h @@ -26,7 +26,6 @@ struct semaphore { struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name, 1) -#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name, 0) static inline void sema_init (struct semaphore *sem, int val) { diff --git a/include/asm-v850/semaphore.h b/include/asm-v850/semaphore.h index 735baaf..10ed0cc 100644 --- a/include/asm-v850/semaphore.h +++ b/include/asm-v850/semaphore.h @@ -22,7 +22,6 @@ struct semaphore { struct semaphore name = __SEMAPHORE_INITIALIZER (name,count) #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC (name,1) -#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC (name,0) static inline void sema_init (struct semaphore *sem, int val) { diff --git a/include/asm-x86/semaphore_32.h b/include/asm-x86/semaphore_32.h index 4e34a46..835c1d7 100644 --- a/include/asm-x86/semaphore_32.h +++ b/include/asm-x86/semaphore_32.h @@ -59,7 +59,6 @@ struct semaphore { struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) -#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0) static inline void sema_init (struct semaphore *sem, int val) { diff --git a/include/asm-x86/semaphore_64.h b/include/asm-x86/semaphore_64.h index 1194888..7969430 100644 --- a/include/asm-x86/semaphore_64.h +++ b/include/asm-x86/semaphore_64.h @@ -60,7 +60,6 @@ struct semaphore { struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) -#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0) static inline void sema_init (struct semaphore *sem, int val) { diff --git a/include/asm-xtensa/semaphore.h b/include/asm-xtensa/semaphore.h index f10c348..3e04167 100644 --- a/include/asm-xtensa/semaphore.h +++ b/include/asm-xtensa/semaphore.h @@ -33,7 +33,6 @@ struct semaphore { struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) -#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0) static inline void sema_init (struct semaphore *sem, int val) { |