Skip to content

Commit a49ed0b

Browse files
committed
locking: Use __[SPIN|RW]_LOCK_UNLOCKED in [spin|rw]_lock_init()
SPIN_LOCK_UNLOCKED and RW_LOCK_UNLOCKED are deprecated. Replace them with the __*_LOCK_UNLOCKED variants. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
1 parent c9286b7 commit a49ed0b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎include/linux/spinlock.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ do { \
100100

101101
#else
102102
# define spin_lock_init(lock) \
103-
do { *(lock) = SPIN_LOCK_UNLOCKED; } while (0)
103+
do { *(lock) = __SPIN_LOCK_UNLOCKED(lock); } while (0)
104104
#endif
105105

106106
#ifdef CONFIG_DEBUG_SPINLOCK
@@ -114,7 +114,7 @@ do { \
114114
} while (0)
115115
#else
116116
# define rwlock_init(lock) \
117-
do { *(lock) = RW_LOCK_UNLOCKED; } while (0)
117+
do { *(lock) = __RW_LOCK_UNLOCKED(lock); } while (0)
118118
#endif
119119

120120
#define spin_is_locked(lock) __raw_spin_is_locked(&(lock)->raw_lock)

0 commit comments

Comments
 (0)