mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-25 17:53:34 -05:00
rtc: mxc: 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-6-git-send-email-tanxiaofei@huawei.com
This commit is contained in:
parent
669022c29a
commit
3f2d301847
1 changed files with 2 additions and 3 deletions
|
@ -189,11 +189,10 @@ static irqreturn_t mxc_rtc_interrupt(int irq, void *dev_id)
|
||||||
struct platform_device *pdev = dev_id;
|
struct platform_device *pdev = dev_id;
|
||||||
struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
|
struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
|
||||||
void __iomem *ioaddr = pdata->ioaddr;
|
void __iomem *ioaddr = pdata->ioaddr;
|
||||||
unsigned long flags;
|
|
||||||
u32 status;
|
u32 status;
|
||||||
u32 events = 0;
|
u32 events = 0;
|
||||||
|
|
||||||
spin_lock_irqsave(&pdata->rtc->irq_lock, flags);
|
spin_lock(&pdata->rtc->irq_lock);
|
||||||
status = readw(ioaddr + RTC_RTCISR) & readw(ioaddr + RTC_RTCIENR);
|
status = readw(ioaddr + RTC_RTCISR) & readw(ioaddr + RTC_RTCIENR);
|
||||||
/* clear interrupt sources */
|
/* clear interrupt sources */
|
||||||
writew(status, ioaddr + RTC_RTCISR);
|
writew(status, ioaddr + RTC_RTCISR);
|
||||||
|
@ -209,7 +208,7 @@ static irqreturn_t mxc_rtc_interrupt(int irq, void *dev_id)
|
||||||
events |= (RTC_PF | RTC_IRQF);
|
events |= (RTC_PF | RTC_IRQF);
|
||||||
|
|
||||||
rtc_update_irq(pdata->rtc, 1, events);
|
rtc_update_irq(pdata->rtc, 1, events);
|
||||||
spin_unlock_irqrestore(&pdata->rtc->irq_lock, flags);
|
spin_unlock(&pdata->rtc->irq_lock);
|
||||||
|
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue