msm: camera: Set proper state of parent object while merging
When merging multiple children to create a parent merged object,
set the state of the parent sync object after going through each
child sync object.
Apply the following logic in order, while arriving at the state of
the parent object:
- If any child is in error, set parent state as error
- If any child is in active, set parent state as active
- If all objects are success, set parent state as success
If resulting parent state is not active (i.e. either success or error),
signal the completion variable so that any waiting threads on the sync
object can wake up.
CRs-Fixed: 1108613
Change-Id: I1c1902e87979e421840f501f3c709b337225bb9c
Signed-off-by: Seemanta Dutta <seemanta@codeaurora.org>
1 file changed