Skip to content

Commit 6950d04

Browse files
Xiaofei Tanalexandrebelloni
Xiaofei Tan
authored andcommitted
rtc: cmos: 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 <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent ddd0521 commit 6950d04

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/rtc/rtc-cmos.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -643,11 +643,10 @@ static struct cmos_rtc cmos_rtc;
643643

644644
static irqreturn_t cmos_interrupt(int irq, void *p)
645645
{
646-
unsigned long flags;
647646
u8 irqstat;
648647
u8 rtc_control;
649648

650-
spin_lock_irqsave(&rtc_lock, flags);
649+
spin_lock(&rtc_lock);
651650

652651
/* When the HPET interrupt handler calls us, the interrupt
653652
* status is passed as arg1 instead of the irq number. But
@@ -681,7 +680,7 @@ static irqreturn_t cmos_interrupt(int irq, void *p)
681680
hpet_mask_rtc_irq_bit(RTC_AIE);
682681
CMOS_READ(RTC_INTR_FLAGS);
683682
}
684-
spin_unlock_irqrestore(&rtc_lock, flags);
683+
spin_unlock(&rtc_lock);
685684

686685
if (is_intr(irqstat)) {
687686
rtc_update_irq(p, 1, irqstat);

0 commit comments

Comments
 (0)