[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1612355981-6764-7-git-send-email-tanxiaofei@huawei.com>
Date: Wed, 3 Feb 2021 20:39:41 +0800
From: Xiaofei Tan <tanxiaofei@...wei.com>
To: <a.zummo@...ertech.it>, <alexandre.belloni@...tlin.com>
CC: Xiaofei Tan <tanxiaofei@...wei.com>, <linux-rtc@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <linuxarm@...wei.com>
Subject: [PATCH 6/6] 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@...wei.com>
---
drivers/rtc/rtc-mxc_v2.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/rtc/rtc-mxc_v2.c b/drivers/rtc/rtc-mxc_v2.c
index 0d73f6f..a577a74 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;
}
--
2.8.1
Powered by blists - more mailing lists