gpu: ion: Refactor locking
authorRebecca Schultz Zavin <rebecca@android.com>
Fri, 13 Dec 2013 22:24:16 +0000 (14:24 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2013 16:55:39 +0000 (08:55 -0800)
commit8d7ab9a9e15b1d8965fb99b8486cae039a2de40e
treed1f8a9e28630b0e65a4cb05595a2e33cccaac08a
parent797a95c48c48d5b83bf1a7893602161d2e2a4654
gpu: ion: Refactor locking

Removes contention for lock between allocate and free by reducing
the length of time the lock is held for.  Split out a seperate
lock to protect the list of heaps and replace it with a rwsem since
the list will most likely only be updated during initialization.

Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
[jstultz: modified patch to apply to staging directory]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/ion/ion.c