Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Weihang Li and committed by
Wolfram Sang
bb3fe9ff 679c314b

+4 -6
+2 -3
drivers/i2c/busses/i2c-digicolor.c
··· 160 160 { 161 161 struct dc_i2c *i2c = dev_id; 162 162 int cmd_status = dc_i2c_cmd_status(i2c); 163 - unsigned long flags; 164 163 u8 addr_cmd; 165 164 166 165 writeb_relaxed(1, i2c->regs + II_INTFLAG_CLEAR); 167 166 168 - spin_lock_irqsave(&i2c->lock, flags); 167 + spin_lock(&i2c->lock); 169 168 170 169 if (cmd_status == II_CMD_STATUS_ACK_BAD 171 170 || cmd_status == II_CMD_STATUS_ABORT) { ··· 206 207 } 207 208 208 209 out: 209 - spin_unlock_irqrestore(&i2c->lock, flags); 210 + spin_unlock(&i2c->lock); 210 211 return IRQ_HANDLED; 211 212 } 212 213
+2 -3
drivers/i2c/busses/i2c-jz4780.c
··· 437 437 unsigned short intst; 438 438 unsigned short intmsk; 439 439 struct jz4780_i2c *i2c = dev_id; 440 - unsigned long flags; 441 440 442 - spin_lock_irqsave(&i2c->lock, flags); 441 + spin_lock(&i2c->lock); 443 442 intmsk = jz4780_i2c_readw(i2c, JZ4780_I2C_INTM); 444 443 intst = jz4780_i2c_readw(i2c, JZ4780_I2C_INTST); 445 444 ··· 550 551 } 551 552 552 553 done: 553 - spin_unlock_irqrestore(&i2c->lock, flags); 554 + spin_unlock(&i2c->lock); 554 555 return IRQ_HANDLED; 555 556 } 556 557