staging: android: persistent_ram: make persistent_ram_write atomic
authorColin Cross <ccross@android.com>
Thu, 8 Mar 2012 01:34:35 +0000 (17:34 -0800)
committerGrazvydas Ignotas <notasas@gmail.com>
Wed, 25 Apr 2012 22:25:03 +0000 (01:25 +0300)
commit9ec12b4106cc43d27db79ef621afeaf8a430c842
tree9901f6afbabac65cdf02dc9877e256a01c2384fc
parenta3abddf0b231787ddb1e36189060aba122904581
staging: android: persistent_ram: make persistent_ram_write atomic

Allow persistent_ram_write to be called on multiple cpus at
the same time, as long as ecc is not in use.  Uses atomics
for the buffer->start and buffer->size counters.

[jstultz: Fix up some pr_info casting issues on 64bit]
CC: Greg KH <gregkh@linuxfoundation.org>
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/persistent_ram.c