aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/spinlocks.txt
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-01-23 09:30:09 -0500
committerThomas Gleixner <tglx@linutronix.de>2011-01-27 06:30:38 -0500
commitd04fa5a3ba06c3b7a1c4a6860d0fa4825507a755 (patch)
treee17ac53c5bb9b60839d4722533fb0b6ba1c87027 /Documentation/spinlocks.txt
parent10389a15e25fd4784d42de7e0e3fc8c242f2011d (diff)
locking: Remove deprecated lock initializers
Last users are gone. Remove the left overs. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'Documentation/spinlocks.txt')
-rw-r--r--Documentation/spinlocks.txt24
1 files changed, 1 insertions, 23 deletions
diff --git a/Documentation/spinlocks.txt b/Documentation/spinlocks.txt
index 178c831b907d..2e3c64b1a6a5 100644
--- a/Documentation/spinlocks.txt
+++ b/Documentation/spinlocks.txt
@@ -86,7 +86,7 @@ to change the variables it has to get an exclusive write lock.
86 86
87The routines look the same as above: 87The routines look the same as above:
88 88
89 rwlock_t xxx_lock = RW_LOCK_UNLOCKED; 89 rwlock_t xxx_lock = __RW_LOCK_UNLOCKED(xxx_lock);
90 90
91 unsigned long flags; 91 unsigned long flags;
92 92
@@ -196,25 +196,3 @@ appropriate:
196 196
197For static initialization, use DEFINE_SPINLOCK() / DEFINE_RWLOCK() or 197For static initialization, use DEFINE_SPINLOCK() / DEFINE_RWLOCK() or
198__SPIN_LOCK_UNLOCKED() / __RW_LOCK_UNLOCKED() as appropriate. 198__SPIN_LOCK_UNLOCKED() / __RW_LOCK_UNLOCKED() as appropriate.
199
200SPIN_LOCK_UNLOCKED and RW_LOCK_UNLOCKED are deprecated. These interfere
201with lockdep state tracking.
202
203Most of the time, you can simply turn:
204 static spinlock_t xxx_lock = SPIN_LOCK_UNLOCKED;
205into:
206 static DEFINE_SPINLOCK(xxx_lock);
207
208Static structure member variables go from:
209
210 struct foo bar {
211 .lock = SPIN_LOCK_UNLOCKED;
212 };
213
214to:
215
216 struct foo bar {
217 .lock = __SPIN_LOCK_UNLOCKED(bar.lock);
218 };
219
220Declaration of static rw_locks undergo a similar transformation.