mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-15 00:34:10 +08:00
rtc: mxc_v2: Replace spin_lock_irqsave with spin_lock in hard IRQ
It is redundant to do irqsave and irqrestore in hardIRQ context, where it has been in a irq-disabled context. Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/1612355981-6764-7-git-send-email-tanxiaofei@huawei.com
This commit is contained in:
parent
3f2d301847
commit
0c1095d334
@ -74,13 +74,12 @@ static irqreturn_t mxc_rtc_interrupt(int irq, void *dev_id)
|
||||
struct device *dev = dev_id;
|
||||
struct mxc_rtc_data *pdata = dev_get_drvdata(dev);
|
||||
void __iomem *ioaddr = pdata->ioaddr;
|
||||
unsigned long flags;
|
||||
u32 lp_status;
|
||||
u32 lp_cr;
|
||||
|
||||
spin_lock_irqsave(&pdata->lock, flags);
|
||||
spin_lock(&pdata->lock);
|
||||
if (clk_enable(pdata->clk)) {
|
||||
spin_unlock_irqrestore(&pdata->lock, flags);
|
||||
spin_unlock(&pdata->lock);
|
||||
return IRQ_NONE;
|
||||
}
|
||||
|
||||
@ -104,7 +103,7 @@ static irqreturn_t mxc_rtc_interrupt(int irq, void *dev_id)
|
||||
|
||||
mxc_rtc_sync_lp_locked(dev, ioaddr);
|
||||
clk_disable(pdata->clk);
|
||||
spin_unlock_irqrestore(&pdata->lock, flags);
|
||||
spin_unlock(&pdata->lock);
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user