summaryrefslogtreecommitdiff
path: root/include/asm-xtensa
diff options
context:
space:
mode:
authorArthur Othieno <a.othieno@bluewin.ch>2005-11-07 11:59:01 +0300
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 18:53:32 +0300
commitaa3a6f456f6ca162d3406a6e2c09a5c928833e4f (patch)
tree4a00d3d18f2a1f0615752ce85a343c0dffa55e37 /include/asm-xtensa
parent23f88fe4bffe01a0d29326789cb5813cd6f8158e (diff)
downloadlinux-aa3a6f456f6ca162d3406a6e2c09a5c928833e4f.tar.xz
[PATCH] xtensa: struct semaphore.sleepers initialization
No one may sleep on us until we've been down()'d. So on allocation, initialize `sleepers' to 0, just like everyone else does. Signed-off-by: Arthur Othieno <a.othieno@bluewin.ch> Acked-by: Christian Zankel <chris@zankel.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-xtensa')
-rw-r--r--include/asm-xtensa/semaphore.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/asm-xtensa/semaphore.h b/include/asm-xtensa/semaphore.h
index 2a10e193b929..f10c3487cd4c 100644
--- a/include/asm-xtensa/semaphore.h
+++ b/include/asm-xtensa/semaphore.h
@@ -38,6 +38,7 @@ struct semaphore {
static inline void sema_init (struct semaphore *sem, int val)
{
atomic_set(&sem->count, val);
+ sem->sleepers = 0;
init_waitqueue_head(&sem->wait);
}