Skip to content

Commit

Permalink
mtd: rawnand: r852: replace spin_lock_irqsave by spin_lock in hard IRQ
Browse files Browse the repository at this point in the history
The code has been in a irq-disabled context since it is hard IRQ. There
is no necessity to do it again.

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/1615770495-31939-1-git-send-email-tiantao6@hisilicon.com
  • Loading branch information
Tian Tao authored and Miquel Raynal committed Mar 28, 2021
1 parent 7a534c5 commit 4682dd1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/mtd/nand/raw/r852.c
Original file line number Diff line number Diff line change
Expand Up @@ -724,10 +724,9 @@ static irqreturn_t r852_irq(int irq, void *data)
struct r852_device *dev = (struct r852_device *)data;

uint8_t card_status, dma_status;
unsigned long flags;
irqreturn_t ret = IRQ_NONE;

spin_lock_irqsave(&dev->irqlock, flags);
spin_lock(&dev->irqlock);

/* handle card detection interrupts first */
card_status = r852_read_reg(dev, R852_CARD_IRQ_STA);
Expand Down Expand Up @@ -813,7 +812,7 @@ static irqreturn_t r852_irq(int irq, void *data)
dbg("strange card status = %x", card_status);

out:
spin_unlock_irqrestore(&dev->irqlock, flags);
spin_unlock(&dev->irqlock);
return ret;
}

Expand Down

0 comments on commit 4682dd1

Please sign in to comment.