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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Mar 2012 17:36:08 +0000 (09:36 -0800)
commit808d0387eb7df3f83352ca41f8c943cb3ed61246
treef3913e3602acefdf89c21f41f085a0fa40ffe658
parent404a6043385de17273624b076599669db5ad891f
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