mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-12 19:44:51 -04:00
[media] omap3isp: ccdc: Simplify ccdc_lsc_is_configured()
Use a local variable to avoid the duplicate spin_unlock_irqrestore() call. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Enrico Butera <ebutera@users.sourceforge.net> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
8815392a1d
commit
1c74817405
@@ -481,14 +481,13 @@ static int ccdc_lsc_config(struct isp_ccdc_device *ccdc,
|
||||
static inline int ccdc_lsc_is_configured(struct isp_ccdc_device *ccdc)
|
||||
{
|
||||
unsigned long flags;
|
||||
int ret;
|
||||
|
||||
spin_lock_irqsave(&ccdc->lsc.req_lock, flags);
|
||||
if (ccdc->lsc.active) {
|
||||
spin_unlock_irqrestore(&ccdc->lsc.req_lock, flags);
|
||||
return 1;
|
||||
}
|
||||
ret = ccdc->lsc.active != NULL;
|
||||
spin_unlock_irqrestore(&ccdc->lsc.req_lock, flags);
|
||||
return 0;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int ccdc_lsc_enable(struct isp_ccdc_device *ccdc)
|
||||
|
||||
Reference in New Issue
Block a user