mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
rtc: nct6694: use guard
Use guard() to simplify locking Link: https://patch.msgid.link/20261019211827.126262-13-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
parent
279900b87b
commit
ea0e1e3094
|
|
@ -210,20 +210,16 @@ static irqreturn_t nct6694_irq(int irq, void *dev_id)
|
|||
};
|
||||
int ret;
|
||||
|
||||
rtc_lock(data->rtc);
|
||||
guard(rtc_ops)(data->rtc);
|
||||
|
||||
sts->irq_en = NCT6694_RTC_IRQ_EN;
|
||||
sts->irq_pend = NCT6694_RTC_IRQ_STS;
|
||||
ret = nct6694_write_msg(data->nct6694, &cmd_hd, sts);
|
||||
if (ret) {
|
||||
rtc_unlock(data->rtc);
|
||||
if (ret)
|
||||
return IRQ_NONE;
|
||||
}
|
||||
|
||||
rtc_update_irq(data->rtc, 1, RTC_IRQF | RTC_AF);
|
||||
|
||||
rtc_unlock(data->rtc);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user