gpu: ion: Loop on the handle count when destroying
authorLaura Abbott <lauraa@codeaurora.org>
Thu, 7 Jun 2012 23:41:30 +0000 (16:41 -0700)
committerArve Hjønnevåg <arve@android.com>
Mon, 1 Jul 2013 20:40:49 +0000 (13:40 -0700)
commit75d890577808925f997e4a985f78b64e9f4a26c3
tree192ac85f0101b9eb43bde43f04a46f6f734d31ac
parentbb3c1525e1b101d278922e2c824b2f843ac56835
gpu: ion: Loop on the handle count when destroying

When destroying a handle, all kernel mappings to that handle
should be destroyed. Other handles may still have references
and valid mappings to the buffer underneath which should not
be destroyed. Loop on the handle reference count, not the buffer
reference count to get rid of all kernel mappings for the handle.

Change-Id: I7dc5d6a86513fc5fa4e21110ceab434714ea2493
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
drivers/gpu/ion/ion.c