msm: camera: isp: Check for execution context prior to obtaining lock
Currently, in_interrupt() is used to determine task context.
in_interrupt() would return 0 if the execution is in task context;
a spin lock is obtained with bh disabled. Since the bh's are disabled,
the preempt count/soft_irq disable count would increase.
When we attempt to release the lock, the same in_interrupt() API
would now return non-zero, failing to release the lock.
The change uses appropriate preempt API to determine execution context.
CRs-Fixed: 3509317
Change-Id: I43f981bf3a2d4c238cebc4b29fa8a9aa0a8e0df3
Signed-off-by: Soumen Ghosh <[email protected]>