X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=include%2Flinux%2Fspinlock_types.h;h=f6a3a951b79eda3fc409913d10819361fe41faa3;hb=47b687882c02f802dd5bbe1227effe006820246e;hp=dc5fb69e4de9333ec84fef3f28c9a5bbbbab649d;hpb=cf57a308436653f3094590202c77459aab250ff3;p=karo-tx-linux.git diff --git a/include/linux/spinlock_types.h b/include/linux/spinlock_types.h index dc5fb69e4de9..f6a3a951b79e 100644 --- a/include/linux/spinlock_types.h +++ b/include/linux/spinlock_types.h @@ -9,14 +9,14 @@ * Released under the General Public License (GPL). */ -#include - #if defined(CONFIG_SMP) # include #else # include #endif +#include + typedef struct { raw_spinlock_t raw_lock; #if defined(CONFIG_PREEMPT) && defined(CONFIG_SMP) @@ -85,6 +85,12 @@ typedef struct { RW_DEP_MAP_INIT(lockname) } #endif +/* + * SPIN_LOCK_UNLOCKED and RW_LOCK_UNLOCKED defeat lockdep state tracking and + * are hence deprecated. + * Please use DEFINE_SPINLOCK()/DEFINE_RWLOCK() or + * __SPIN_LOCK_UNLOCKED()/__RW_LOCK_UNLOCKED() as appropriate. + */ #define SPIN_LOCK_UNLOCKED __SPIN_LOCK_UNLOCKED(old_style_spin_init) #define RW_LOCK_UNLOCKED __RW_LOCK_UNLOCKED(old_style_rw_init)