mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
locking: Remove deprecated lock initializers
Last users are gone. Remove the left overs. Signed-off-by: Thomas Gleixner <[email protected]>
This commit is contained in:
parent
10389a15e2
commit
d04fa5a3ba
4 changed files with 1 additions and 44 deletions
|
|
@ -86,7 +86,7 @@ to change the variables it has to get an exclusive write lock.
|
|||
|
||||
The routines look the same as above:
|
||||
|
||||
rwlock_t xxx_lock = RW_LOCK_UNLOCKED;
|
||||
rwlock_t xxx_lock = __RW_LOCK_UNLOCKED(xxx_lock);
|
||||
|
||||
unsigned long flags;
|
||||
|
||||
|
|
@ -196,25 +196,3 @@ appropriate:
|
|||
|
||||
For static initialization, use DEFINE_SPINLOCK() / DEFINE_RWLOCK() or
|
||||
__SPIN_LOCK_UNLOCKED() / __RW_LOCK_UNLOCKED() as appropriate.
|
||||
|
||||
SPIN_LOCK_UNLOCKED and RW_LOCK_UNLOCKED are deprecated. These interfere
|
||||
with lockdep state tracking.
|
||||
|
||||
Most of the time, you can simply turn:
|
||||
static spinlock_t xxx_lock = SPIN_LOCK_UNLOCKED;
|
||||
into:
|
||||
static DEFINE_SPINLOCK(xxx_lock);
|
||||
|
||||
Static structure member variables go from:
|
||||
|
||||
struct foo bar {
|
||||
.lock = SPIN_LOCK_UNLOCKED;
|
||||
};
|
||||
|
||||
to:
|
||||
|
||||
struct foo bar {
|
||||
.lock = __SPIN_LOCK_UNLOCKED(bar.lock);
|
||||
};
|
||||
|
||||
Declaration of static rw_locks undergo a similar transformation.
|
||||
|
|
|
|||
Loading…
Reference in a new issue