From 0c1095d334dafda22463454b0519c926447b555e Mon Sep 17 00:00:00 2001 From: Xiaofei Tan Date: Wed, 3 Feb 2021 20:39:41 +0800 Subject: 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 Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/1612355981-6764-7-git-send-email-tanxiaofei@huawei.com --- drivers/rtc/rtc-mxc_v2.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'drivers/rtc') diff --git a/drivers/rtc/rtc-mxc_v2.c b/drivers/rtc/rtc-mxc_v2.c index 0d73f6f0cf9e..a577a74aaf75 100644 --- a/drivers/rtc/rtc-mxc_v2.c +++ b/drivers/rtc/rtc-mxc_v2.c @@ -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; } -- cgit v1.2.3