diff options
author | Weihang Li <liweihang@huawei.com> | 2021-02-08 13:48:37 +0300 |
---|---|---|
committer | Wolfram Sang <wsa@kernel.org> | 2021-02-12 10:21:57 +0300 |
commit | bb3fe9ff5306d058af952f689f22448af286def8 (patch) | |
tree | b92084fcc0306f0c8e33e09da06e215406bcaccc /drivers/i2c | |
parent | 679c314b842ac56f8353500cba67fccc68c0b40f (diff) | |
download | linux-bb3fe9ff5306d058af952f689f22448af286def8.tar.xz |
i2c: busses: Replace spin_lock_irqsave with spin_lock in hard IRQ
There is no need to do irqsave and irqrestore in context of hard IRQ.
Signed-off-by: Weihang Li <liweihang@huawei.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-digicolor.c | 5 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-jz4780.c | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/drivers/i2c/busses/i2c-digicolor.c b/drivers/i2c/busses/i2c-digicolor.c index f67639dc74b7..60c838c7c454 100644 --- a/drivers/i2c/busses/i2c-digicolor.c +++ b/drivers/i2c/busses/i2c-digicolor.c @@ -160,12 +160,11 @@ static irqreturn_t dc_i2c_irq(int irq, void *dev_id) { struct dc_i2c *i2c = dev_id; int cmd_status = dc_i2c_cmd_status(i2c); - unsigned long flags; u8 addr_cmd; writeb_relaxed(1, i2c->regs + II_INTFLAG_CLEAR); - spin_lock_irqsave(&i2c->lock, flags); + spin_lock(&i2c->lock); if (cmd_status == II_CMD_STATUS_ACK_BAD || cmd_status == II_CMD_STATUS_ABORT) { @@ -207,7 +206,7 @@ static irqreturn_t dc_i2c_irq(int irq, void *dev_id) } out: - spin_unlock_irqrestore(&i2c->lock, flags); + spin_unlock(&i2c->lock); return IRQ_HANDLED; } diff --git a/drivers/i2c/busses/i2c-jz4780.c b/drivers/i2c/busses/i2c-jz4780.c index cb4a25ebb890..8509c5f11356 100644 --- a/drivers/i2c/busses/i2c-jz4780.c +++ b/drivers/i2c/busses/i2c-jz4780.c @@ -437,9 +437,8 @@ static irqreturn_t jz4780_i2c_irq(int irqno, void *dev_id) unsigned short intst; unsigned short intmsk; struct jz4780_i2c *i2c = dev_id; - unsigned long flags; - spin_lock_irqsave(&i2c->lock, flags); + spin_lock(&i2c->lock); intmsk = jz4780_i2c_readw(i2c, JZ4780_I2C_INTM); intst = jz4780_i2c_readw(i2c, JZ4780_I2C_INTST); @@ -551,7 +550,7 @@ static irqreturn_t jz4780_i2c_irq(int irqno, void *dev_id) } done: - spin_unlock_irqrestore(&i2c->lock, flags); + spin_unlock(&i2c->lock); return IRQ_HANDLED; } |