]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/linux/seqlock.h
[PATCH] Fix gate_vma.vm_flags
[karo-tx-linux.git] / include / linux / seqlock.h
index 46000936f8f1d5f39e92aa1e260518475b567e1a..6b0648cfdffcf869ee59784db66e81ae8991a382 100644 (file)
@@ -44,8 +44,11 @@ typedef struct {
 #define SEQLOCK_UNLOCKED \
                 __SEQLOCK_UNLOCKED(old_style_seqlock_init)
 
-#define seqlock_init(x) \
-               do { *(x) = (seqlock_t) __SEQLOCK_UNLOCKED(x); } while (0)
+#define seqlock_init(x)                                        \
+       do {                                            \
+               (x)->sequence = 0;                      \
+               spin_lock_init(&(x)->lock);             \
+       } while (0)
 
 #define DEFINE_SEQLOCK(x) \
                seqlock_t x = __SEQLOCK_UNLOCKED(x)