mirror of
https://github.com/torvalds/linux.git
synced 2026-06-06 21:45:45 +02:00
rtc: cmos: Replace spin_lock_irqsave with spin_lock in hard IRQ
[ Upstream commit 6950d046eb ]
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-2-git-send-email-tanxiaofei@huawei.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
acfd8ef683
commit
17293d630f
|
|
@ -704,11 +704,10 @@ static struct cmos_rtc cmos_rtc;
|
||||||
|
|
||||||
static irqreturn_t cmos_interrupt(int irq, void *p)
|
static irqreturn_t cmos_interrupt(int irq, void *p)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
|
||||||
u8 irqstat;
|
u8 irqstat;
|
||||||
u8 rtc_control;
|
u8 rtc_control;
|
||||||
|
|
||||||
spin_lock_irqsave(&rtc_lock, flags);
|
spin_lock(&rtc_lock);
|
||||||
|
|
||||||
/* When the HPET interrupt handler calls us, the interrupt
|
/* When the HPET interrupt handler calls us, the interrupt
|
||||||
* status is passed as arg1 instead of the irq number. But
|
* status is passed as arg1 instead of the irq number. But
|
||||||
|
|
@ -742,7 +741,7 @@ static irqreturn_t cmos_interrupt(int irq, void *p)
|
||||||
hpet_mask_rtc_irq_bit(RTC_AIE);
|
hpet_mask_rtc_irq_bit(RTC_AIE);
|
||||||
CMOS_READ(RTC_INTR_FLAGS);
|
CMOS_READ(RTC_INTR_FLAGS);
|
||||||
}
|
}
|
||||||
spin_unlock_irqrestore(&rtc_lock, flags);
|
spin_unlock(&rtc_lock);
|
||||||
|
|
||||||
if (is_intr(irqstat)) {
|
if (is_intr(irqstat)) {
|
||||||
rtc_update_irq(p, 1, irqstat);
|
rtc_update_irq(p, 1, irqstat);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user