media: rc/ite-cir: replace spin_lock_irqsave by spin_lock in hard IRQ

It is redundant to do irqsave and irqrestore in hardIRQ context.

Signed-off-by: Daode Huang <huangdaode@huawei.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
Daode Huang 2021-02-05 10:39:11 +01:00 committed by Mauro Carvalho Chehab
parent c4a1bff950
commit dd35450691
1 changed files with 4 additions and 8 deletions

View File

@ -262,7 +262,6 @@ static void ite_set_carrier_params(struct ite_dev *dev)
static irqreturn_t ite_cir_isr(int irq, void *data) static irqreturn_t ite_cir_isr(int irq, void *data)
{ {
struct ite_dev *dev = data; struct ite_dev *dev = data;
unsigned long flags;
irqreturn_t ret = IRQ_RETVAL(IRQ_NONE); irqreturn_t ret = IRQ_RETVAL(IRQ_NONE);
u8 rx_buf[ITE_RX_FIFO_LEN]; u8 rx_buf[ITE_RX_FIFO_LEN];
int rx_bytes; int rx_bytes;
@ -271,7 +270,7 @@ static irqreturn_t ite_cir_isr(int irq, void *data)
ite_dbg_verbose("%s firing", __func__); ite_dbg_verbose("%s firing", __func__);
/* grab the spinlock */ /* grab the spinlock */
spin_lock_irqsave(&dev->lock, flags); spin_lock(&dev->lock);
/* read the interrupt flags */ /* read the interrupt flags */
iflags = dev->params.get_irq_causes(dev); iflags = dev->params.get_irq_causes(dev);
@ -287,17 +286,14 @@ static irqreturn_t ite_cir_isr(int irq, void *data)
/* drop the spinlock, since the ir-core layer /* drop the spinlock, since the ir-core layer
* may call us back again through * may call us back again through
* ite_s_idle() */ * ite_s_idle() */
spin_unlock_irqrestore(&dev-> spin_unlock(&dev->lock);
lock,
flags);
/* decode the data we've just received */ /* decode the data we've just received */
ite_decode_bytes(dev, rx_buf, ite_decode_bytes(dev, rx_buf,
rx_bytes); rx_bytes);
/* reacquire the spinlock */ /* reacquire the spinlock */
spin_lock_irqsave(&dev->lock, spin_lock(&dev->lock);
flags);
/* mark the interrupt as serviced */ /* mark the interrupt as serviced */
ret = IRQ_RETVAL(IRQ_HANDLED); ret = IRQ_RETVAL(IRQ_HANDLED);
@ -314,7 +310,7 @@ static irqreturn_t ite_cir_isr(int irq, void *data)
} }
/* drop the spinlock */ /* drop the spinlock */
spin_unlock_irqrestore(&dev->lock, flags); spin_unlock(&dev->lock);
ite_dbg_verbose("%s done returning %d", __func__, (int)ret); ite_dbg_verbose("%s done returning %d", __func__, (int)ret);