diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2014-06-10 06:15:33 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-08-21 15:25:16 -0500 |
commit | 1c74817405d42572db2071b0b4a9609b487c91a7 (patch) | |
tree | b10f595ab3227552d778a5471a7d372b690f2da9 /drivers/media/platform/omap3isp | |
parent | 8815392a1d190201765682a82ca4c3e6ad03a674 (diff) | |
download | linux-stable-1c74817405d42572db2071b0b4a9609b487c91a7.tar.gz linux-stable-1c74817405d42572db2071b0b4a9609b487c91a7.tar.bz2 linux-stable-1c74817405d42572db2071b0b4a9609b487c91a7.zip |
[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>
Diffstat (limited to 'drivers/media/platform/omap3isp')
-rw-r--r-- | drivers/media/platform/omap3isp/ispccdc.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/media/platform/omap3isp/ispccdc.c b/drivers/media/platform/omap3isp/ispccdc.c index cd62d29d34c4..6a62cb76cd1f 100644 --- a/drivers/media/platform/omap3isp/ispccdc.c +++ b/drivers/media/platform/omap3isp/ispccdc.c @@ -481,14 +481,13 @@ done: 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) |