Commit 1c748174 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab

[media] omap3isp: ccdc: Simplify ccdc_lsc_is_configured()

Use a local variable to avoid the duplicate spin_unlock_irqrestore()
call.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: default avatarEnrico Butera <ebutera@users.sourceforge.net>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 8815392a
...@@ -481,14 +481,13 @@ static int ccdc_lsc_config(struct isp_ccdc_device *ccdc, ...@@ -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) static inline int ccdc_lsc_is_configured(struct isp_ccdc_device *ccdc)
{ {
unsigned long flags; unsigned long flags;
int ret;
spin_lock_irqsave(&ccdc->lsc.req_lock, flags); spin_lock_irqsave(&ccdc->lsc.req_lock, flags);
if (ccdc->lsc.active) { ret = ccdc->lsc.active != NULL;
spin_unlock_irqrestore(&ccdc->lsc.req_lock, flags);
return 1;
}
spin_unlock_irqrestore(&ccdc->lsc.req_lock, flags); spin_unlock_irqrestore(&ccdc->lsc.req_lock, flags);
return 0;
return ret;
} }
static int ccdc_lsc_enable(struct isp_ccdc_device *ccdc) static int ccdc_lsc_enable(struct isp_ccdc_device *ccdc)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment