msm: camera: sync: protect sync obj creation from race condition

Multiple thread can find the same sync obj and waiting for lock.
If the spinlock releases after another thread finds a sync obj,
there is possibility that they will get the same id. Use atomic
operation to ensure obj is free.

Change-Id: I1d3c40f2c0315d27ecf11b953a3c9bdb89d41ef8
Signed-off-by: Junzhe Zou <jnzhezou@codeaurora.org>
1 file changed