Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

[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
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -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)