mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
rtc: atcrtc100: use guard
Use guard() to simplify locking Link: https://patch.msgid.link/20261019211827.126262-4-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
parent
217439c8fc
commit
f371caa420
|
|
@ -147,7 +147,7 @@ static void atcrtc_alarm_clear(struct work_struct *work)
|
|||
container_of(work, struct atcrtc_dev, rtc_work);
|
||||
int ret;
|
||||
|
||||
rtc_lock(rtc->rtc_dev);
|
||||
guard(rtc_ops)(rtc->rtc_dev);
|
||||
|
||||
if (!rtc->alarm_en) {
|
||||
ret = atcrtc_check_write_done(rtc);
|
||||
|
|
@ -159,7 +159,6 @@ static void atcrtc_alarm_clear(struct work_struct *work)
|
|||
regmap_update_bits(rtc->regmap, RTC_CR,
|
||||
ALARM_WAKEUP | ALARM_INT, 0);
|
||||
}
|
||||
rtc_unlock(rtc->rtc_dev);
|
||||
}
|
||||
|
||||
static int atcrtc_read_time(struct device *dev, struct rtc_time *tm)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user