Skip to content

Commit e236893

Browse files
Barry Songbroonie
authored andcommitted
spi: spi-stm32: remove redundant irqsave and irqrestore in hardIRQ
Running in hardIRQ, disabling IRQ is redundant. Signed-off-by: Barry Song <song.bao.hua@hisilicon.com> Link: https://lore.kernel.org/r/20200926001616.21292-2-song.bao.hua@hisilicon.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 69544f2 commit e236893

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

‎drivers/spi/spi-stm32.c‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -804,10 +804,9 @@ static irqreturn_t stm32f4_spi_irq_event(int irq, void *dev_id)
804804
struct spi_master *master = dev_id;
805805
struct stm32_spi *spi = spi_master_get_devdata(master);
806806
u32 sr, mask = 0;
807-
unsigned long flags;
808807
bool end = false;
809808

810-
spin_lock_irqsave(&spi->lock, flags);
809+
spin_lock(&spi->lock);
811810

812811
sr = readl_relaxed(spi->base + STM32F4_SPI_SR);
813812
/*
@@ -833,7 +832,7 @@ static irqreturn_t stm32f4_spi_irq_event(int irq, void *dev_id)
833832

834833
if (!(sr & mask)) {
835834
dev_dbg(spi->dev, "spurious IT (sr=0x%08x)\n", sr);
836-
spin_unlock_irqrestore(&spi->lock, flags);
835+
spin_unlock(&spi->lock);
837836
return IRQ_NONE;
838837
}
839838

@@ -875,11 +874,11 @@ static irqreturn_t stm32f4_spi_irq_event(int irq, void *dev_id)
875874
STM32F4_SPI_CR2_TXEIE |
876875
STM32F4_SPI_CR2_RXNEIE |
877876
STM32F4_SPI_CR2_ERRIE);
878-
spin_unlock_irqrestore(&spi->lock, flags);
877+
spin_unlock(&spi->lock);
879878
return IRQ_WAKE_THREAD;
880879
}
881880

882-
spin_unlock_irqrestore(&spi->lock, flags);
881+
spin_unlock(&spi->lock);
883882
return IRQ_HANDLED;
884883
}
885884

0 commit comments

Comments
 (0)