[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1612355981-6764-4-git-send-email-tanxiaofei@huawei.com>
Date: Wed, 3 Feb 2021 20:39:38 +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 3/6] rtc: r7301: 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-r7301.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/rtc/rtc-r7301.c b/drivers/rtc/rtc-r7301.c
index aaf1b95..5dbaeb7 100644
--- a/drivers/rtc/rtc-r7301.c
+++ b/drivers/rtc/rtc-r7301.c
@@ -320,11 +320,10 @@ static irqreturn_t rtc7301_irq_handler(int irq, void *dev_id)
{
struct rtc_device *rtc = dev_id;
struct rtc7301_priv *priv = dev_get_drvdata(rtc->dev.parent);
- unsigned long flags;
irqreturn_t ret = IRQ_NONE;
u8 alrm_ctrl;
- spin_lock_irqsave(&priv->lock, flags);
+ spin_lock(&priv->lock);
rtc7301_select_bank(priv, 1);
@@ -335,7 +334,7 @@ static irqreturn_t rtc7301_irq_handler(int irq, void *dev_id)
rtc_update_irq(rtc, 1, RTC_IRQF | RTC_AF);
}
- spin_unlock_irqrestore(&priv->lock, flags);
+ spin_unlock(&priv->lock);
return ret;
}
--
2.8.1
Powered by blists - more mailing lists