mirror of
https://github.com/torvalds/linux
synced 2024-09-06 18:01:05 +00:00
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@huawei.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/1612355981-6764-4-git-send-email-tanxiaofei@huawei.com
This commit is contained in:
parent
5131797556
commit
be3df3f858
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue