diff options
author | Barry Song <song.bao.hua@hisilicon.com> | 2020-09-16 22:10:42 +1200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-09-17 19:56:02 +0100 |
commit | 7349201d9dfe0420489aa551c2dcc80fd6364799 (patch) | |
tree | fe197289ca705ea12aeaa52c3ffc7af0978d9aa2 /drivers/spi/spi-lantiq-ssc.c | |
parent | 985be7ebfbf79767bc3705eee7de635edd4eba7d (diff) | |
download | lwn-7349201d9dfe0420489aa551c2dcc80fd6364799.tar.gz lwn-7349201d9dfe0420489aa551c2dcc80fd6364799.zip |
spi: lantiq: 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/20200916101042.21860-1-song.bao.hua@hisilicon.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-lantiq-ssc.c')
-rw-r--r-- | drivers/spi/spi-lantiq-ssc.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/spi/spi-lantiq-ssc.c b/drivers/spi/spi-lantiq-ssc.c index 3cbecb2d8fc0..bcb52601804a 100644 --- a/drivers/spi/spi-lantiq-ssc.c +++ b/drivers/spi/spi-lantiq-ssc.c @@ -625,9 +625,8 @@ static irqreturn_t lantiq_ssc_xmit_interrupt(int irq, void *data) struct lantiq_ssc_spi *spi = data; const struct lantiq_ssc_hwcfg *hwcfg = spi->hwcfg; u32 val = lantiq_ssc_readl(spi, hwcfg->irncr); - unsigned long flags; - spin_lock_irqsave(&spi->lock, flags); + spin_lock(&spi->lock); if (hwcfg->irq_ack) lantiq_ssc_writel(spi, val, hwcfg->irncr); @@ -652,12 +651,12 @@ static irqreturn_t lantiq_ssc_xmit_interrupt(int irq, void *data) } } - spin_unlock_irqrestore(&spi->lock, flags); + spin_unlock(&spi->lock); return IRQ_HANDLED; completed: queue_work(spi->wq, &spi->work); - spin_unlock_irqrestore(&spi->lock, flags); + spin_unlock(&spi->lock); return IRQ_HANDLED; } @@ -668,12 +667,11 @@ static irqreturn_t lantiq_ssc_err_interrupt(int irq, void *data) const struct lantiq_ssc_hwcfg *hwcfg = spi->hwcfg; u32 stat = lantiq_ssc_readl(spi, LTQ_SPI_STAT); u32 val = lantiq_ssc_readl(spi, hwcfg->irncr); - unsigned long flags; if (!(stat & LTQ_SPI_STAT_ERRORS)) return IRQ_NONE; - spin_lock_irqsave(&spi->lock, flags); + spin_lock(&spi->lock); if (hwcfg->irq_ack) lantiq_ssc_writel(spi, val, hwcfg->irncr); @@ -697,7 +695,7 @@ static irqreturn_t lantiq_ssc_err_interrupt(int irq, void *data) if (spi->master->cur_msg) spi->master->cur_msg->status = -EIO; queue_work(spi->wq, &spi->work); - spin_unlock_irqrestore(&spi->lock, flags); + spin_unlock(&spi->lock); return IRQ_HANDLED; } |