diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-07-17 15:25:03 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-02-19 02:42:45 -0500 |
commit | eece09ec213e93333010bf4c6bb9175b32229c54 (patch) | |
tree | 4522e9f64468397499b80428307b68bf163d4c90 | |
parent | c0540606837af79b2ae101e5e7b2206e3844d150 (diff) |
locking: Various static lock initializer fixes
The static lock initializers want to be fed the proper name of the
lock and not some random string. In mainline random strings are
obfuscating the readability of debug output, but for RT they prevent
the spinlock substitution. Fix it up.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | drivers/char/random.c | 6 | ||||
-rw-r--r-- | drivers/usb/chipidea/debug.c | 2 | ||||
-rw-r--r-- | fs/file.c | 2 | ||||
-rw-r--r-- | include/linux/idr.h | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/drivers/char/random.c b/drivers/char/random.c index 85e81ec1451e..594bda9dcfc8 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c | |||
@@ -445,7 +445,7 @@ static struct entropy_store input_pool = { | |||
445 | .poolinfo = &poolinfo_table[0], | 445 | .poolinfo = &poolinfo_table[0], |
446 | .name = "input", | 446 | .name = "input", |
447 | .limit = 1, | 447 | .limit = 1, |
448 | .lock = __SPIN_LOCK_UNLOCKED(&input_pool.lock), | 448 | .lock = __SPIN_LOCK_UNLOCKED(input_pool.lock), |
449 | .pool = input_pool_data | 449 | .pool = input_pool_data |
450 | }; | 450 | }; |
451 | 451 | ||
@@ -454,7 +454,7 @@ static struct entropy_store blocking_pool = { | |||
454 | .name = "blocking", | 454 | .name = "blocking", |
455 | .limit = 1, | 455 | .limit = 1, |
456 | .pull = &input_pool, | 456 | .pull = &input_pool, |
457 | .lock = __SPIN_LOCK_UNLOCKED(&blocking_pool.lock), | 457 | .lock = __SPIN_LOCK_UNLOCKED(blocking_pool.lock), |
458 | .pool = blocking_pool_data | 458 | .pool = blocking_pool_data |
459 | }; | 459 | }; |
460 | 460 | ||
@@ -462,7 +462,7 @@ static struct entropy_store nonblocking_pool = { | |||
462 | .poolinfo = &poolinfo_table[1], | 462 | .poolinfo = &poolinfo_table[1], |
463 | .name = "nonblocking", | 463 | .name = "nonblocking", |
464 | .pull = &input_pool, | 464 | .pull = &input_pool, |
465 | .lock = __SPIN_LOCK_UNLOCKED(&nonblocking_pool.lock), | 465 | .lock = __SPIN_LOCK_UNLOCKED(nonblocking_pool.lock), |
466 | .pool = nonblocking_pool_data | 466 | .pool = nonblocking_pool_data |
467 | }; | 467 | }; |
468 | 468 | ||
diff --git a/drivers/usb/chipidea/debug.c b/drivers/usb/chipidea/debug.c index 3bc244d2636a..a62c4a47d52c 100644 --- a/drivers/usb/chipidea/debug.c +++ b/drivers/usb/chipidea/debug.c | |||
@@ -222,7 +222,7 @@ static struct { | |||
222 | } dbg_data = { | 222 | } dbg_data = { |
223 | .idx = 0, | 223 | .idx = 0, |
224 | .tty = 0, | 224 | .tty = 0, |
225 | .lck = __RW_LOCK_UNLOCKED(lck) | 225 | .lck = __RW_LOCK_UNLOCKED(dbg_data.lck) |
226 | }; | 226 | }; |
227 | 227 | ||
228 | /** | 228 | /** |
@@ -516,7 +516,7 @@ struct files_struct init_files = { | |||
516 | .close_on_exec = init_files.close_on_exec_init, | 516 | .close_on_exec = init_files.close_on_exec_init, |
517 | .open_fds = init_files.open_fds_init, | 517 | .open_fds = init_files.open_fds_init, |
518 | }, | 518 | }, |
519 | .file_lock = __SPIN_LOCK_UNLOCKED(init_task.file_lock), | 519 | .file_lock = __SPIN_LOCK_UNLOCKED(init_files.file_lock), |
520 | }; | 520 | }; |
521 | 521 | ||
522 | /* | 522 | /* |
diff --git a/include/linux/idr.h b/include/linux/idr.h index de7e190f1af4..e5eb125effe6 100644 --- a/include/linux/idr.h +++ b/include/linux/idr.h | |||
@@ -136,7 +136,7 @@ struct ida { | |||
136 | struct ida_bitmap *free_bitmap; | 136 | struct ida_bitmap *free_bitmap; |
137 | }; | 137 | }; |
138 | 138 | ||
139 | #define IDA_INIT(name) { .idr = IDR_INIT(name), .free_bitmap = NULL, } | 139 | #define IDA_INIT(name) { .idr = IDR_INIT((name).idr), .free_bitmap = NULL, } |
140 | #define DEFINE_IDA(name) struct ida name = IDA_INIT(name) | 140 | #define DEFINE_IDA(name) struct ida name = IDA_INIT(name) |
141 | 141 | ||
142 | int ida_pre_get(struct ida *ida, gfp_t gfp_mask); | 142 | int ida_pre_get(struct ida *ida, gfp_t gfp_mask); |