vcodec: fix enable race condition when power on/off
authorHerman Chen <herman.chen@rock-chips.com>
Wed, 27 May 2015 02:26:33 +0000 (10:26 +0800)
committerHerman Chen <herman.chen@rock-chips.com>
Wed, 27 May 2015 02:52:05 +0000 (10:52 +0800)
commit41dad664eb222680a2ac16b268596bc1debaf6c3
tree3964cc6544b5ce735a58c835dfda614f35a37c59
parent8967167af2cb840fd6f1e0d319e4f1e1ba386753
vcodec: fix enable race condition when power on/off

When multi-instances power on at same time the condition enabled maybe
set mutli-times. Use atomic function to replace orginal
read/compare/change operation to avoid multi-instances.
Also add power on/off count to debugfs for checking

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
arch/arm/mach-rockchip/vcodec_service.c