diff options
| author | Takashi Iwai <tiwai@suse.de> | 2016-07-02 10:50:45 +0200 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2016-07-02 10:50:45 +0200 |
| commit | 046e9ceefab985a137fbd15b946497a88e5a6513 (patch) | |
| tree | 29cb2fd3a2783afacc7901f3310bea7a02f84140 /include/linux/seqlock.h | |
| parent | 62db7152c924e4c060e42b34a69cd39658e8a0dc (diff) | |
| parent | 7c5eec4edf4693aa61f3ee78bf28621dfe33d9f0 (diff) | |
Merge tag 'asoc-fix-v4.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v4.7
A small clutch of hardware specific fixes for various ASoC devices, all
small individually and important if you have that device but not
otherwise.
Diffstat (limited to 'include/linux/seqlock.h')
| -rw-r--r-- | include/linux/seqlock.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h index 7973a821ac58..ead97654c4e9 100644 --- a/include/linux/seqlock.h +++ b/include/linux/seqlock.h @@ -277,7 +277,10 @@ static inline void raw_write_seqcount_barrier(seqcount_t *s) static inline int raw_read_seqcount_latch(seqcount_t *s) { - return lockless_dereference(s)->sequence; + int seq = READ_ONCE(s->sequence); + /* Pairs with the first smp_wmb() in raw_write_seqcount_latch() */ + smp_read_barrier_depends(); + return seq; } /** @@ -331,7 +334,7 @@ static inline int raw_read_seqcount_latch(seqcount_t *s) * unsigned seq, idx; * * do { - * seq = lockless_dereference(latch)->seq; + * seq = raw_read_seqcount_latch(&latch->seq); * * idx = seq & 0x01; * entry = data_query(latch->data[idx], ...); |
