summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-07-17 21:25:03 +0200
committerClark Williams <williams@redhat.com>2012-04-10 16:39:59 -0500
commit098ed48b9fd34b2a0dc68fd6cc48d9dd32c1e840 (patch)
tree40d1346513590e6171fedd935bff43edb9558dac
parent7f42ec90bf71a47a83f6ee95a78f72ef81291186 (diff)
locking-various-init-fixes.patch
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--drivers/char/random.c6
-rw-r--r--drivers/usb/gadget/ci13xxx_udc.c2
-rw-r--r--fs/file.c2
-rw-r--r--include/linux/idr.h2
-rw-r--r--kernel/cred.c2
5 files changed, 7 insertions, 7 deletions
diff --git a/drivers/char/random.c b/drivers/char/random.c
index 2913f59d0f78..021b070f5e89 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -433,7 +433,7 @@ static struct entropy_store input_pool = {
.poolinfo = &poolinfo_table[0],
.name = "input",
.limit = 1,
- .lock = __SPIN_LOCK_UNLOCKED(&input_pool.lock),
+ .lock = __SPIN_LOCK_UNLOCKED(input_pool.lock),
.pool = input_pool_data
};
@@ -442,7 +442,7 @@ static struct entropy_store blocking_pool = {
.name = "blocking",
.limit = 1,
.pull = &input_pool,
- .lock = __SPIN_LOCK_UNLOCKED(&blocking_pool.lock),
+ .lock = __SPIN_LOCK_UNLOCKED(blocking_pool.lock),
.pool = blocking_pool_data
};
@@ -450,7 +450,7 @@ static struct entropy_store nonblocking_pool = {
.poolinfo = &poolinfo_table[1],
.name = "nonblocking",
.pull = &input_pool,
- .lock = __SPIN_LOCK_UNLOCKED(&nonblocking_pool.lock),
+ .lock = __SPIN_LOCK_UNLOCKED(nonblocking_pool.lock),
.pool = nonblocking_pool_data
};
diff --git a/drivers/usb/gadget/ci13xxx_udc.c b/drivers/usb/gadget/ci13xxx_udc.c
index 243ef1adf969..238372e7e39d 100644
--- a/drivers/usb/gadget/ci13xxx_udc.c
+++ b/drivers/usb/gadget/ci13xxx_udc.c
@@ -834,7 +834,7 @@ static struct {
} dbg_data = {
.idx = 0,
.tty = 0,
- .lck = __RW_LOCK_UNLOCKED(lck)
+ .lck = __RW_LOCK_UNLOCKED(dbg_data.lck)
};
/**
diff --git a/fs/file.c b/fs/file.c
index ba3f6053025c..6f176f525181 100644
--- a/fs/file.c
+++ b/fs/file.c
@@ -421,7 +421,7 @@ struct files_struct init_files = {
.close_on_exec = init_files.close_on_exec_init,
.open_fds = init_files.open_fds_init,
},
- .file_lock = __SPIN_LOCK_UNLOCKED(init_task.file_lock),
+ .file_lock = __SPIN_LOCK_UNLOCKED(init_files.file_lock),
};
/*
diff --git a/include/linux/idr.h b/include/linux/idr.h
index 255491cf522e..4eaacf03e4a6 100644
--- a/include/linux/idr.h
+++ b/include/linux/idr.h
@@ -136,7 +136,7 @@ struct ida {
struct ida_bitmap *free_bitmap;
};
-#define IDA_INIT(name) { .idr = IDR_INIT(name), .free_bitmap = NULL, }
+#define IDA_INIT(name) { .idr = IDR_INIT((name).idr), .free_bitmap = NULL, }
#define DEFINE_IDA(name) struct ida name = IDA_INIT(name)
int ida_pre_get(struct ida *ida, gfp_t gfp_mask);
diff --git a/kernel/cred.c b/kernel/cred.c
index 97b36eeca4c9..eea01bb2c5ba 100644
--- a/kernel/cred.c
+++ b/kernel/cred.c
@@ -36,7 +36,7 @@ static struct kmem_cache *cred_jar;
static struct thread_group_cred init_tgcred = {
.usage = ATOMIC_INIT(2),
.tgid = 0,
- .lock = __SPIN_LOCK_UNLOCKED(init_cred.tgcred.lock),
+ .lock = __SPIN_LOCK_UNLOCKED(init_tgcred.lock),
};
#endif