Commit 8ddcec87 authored by Hans de Goede's avatar Hans de Goede Committed by Mauro Carvalho Chehab

media: atomisp: Cleanup atomisp_isr_thread() spinlock handling

Refactor the code a tiny bit to avoid the need to have 2 different
paths with spin_unlock_irqrestore() in there.

While at it also remove the non helpful dev_dbg() message.
Reviewed-by: default avatarAndy Shevchenko <andy@kernel.org>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent 8ff6604c
......@@ -959,17 +959,14 @@ irqreturn_t atomisp_isr_thread(int irq, void *isp_ptr)
{
struct atomisp_device *isp = isp_ptr;
unsigned long flags;
dev_dbg(isp->dev, ">%s\n", __func__);
bool streaming;
spin_lock_irqsave(&isp->lock, flags);
if (!isp->asd.streaming) {
streaming = isp->asd.streaming;
spin_unlock_irqrestore(&isp->lock, flags);
return IRQ_HANDLED;
}
spin_unlock_irqrestore(&isp->lock, flags);
if (!streaming)
return IRQ_HANDLED;
/*
* The standard CSS2.0 API tells the following calling sequence of
......
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