diff options
author | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2021-01-20 01:06:52 +0300 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2021-01-26 01:46:17 +0300 |
commit | f66e7f2d32b9f53b4c43d9c4ac0c1c83141db735 (patch) | |
tree | 574480c2141766561591d632660a11934924d1cf | |
parent | 31247546b490ea551dae675037c02f8d9aea31af (diff) | |
download | linux-f66e7f2d32b9f53b4c43d9c4ac0c1c83141db735.tar.xz |
rtc: stm32: use rtc_lock/rtc_unlock
Avoid accessing directly rtc->ops_lock and use the RTC core helpers.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210119220653.677750-14-alexandre.belloni@bootlin.com
-rw-r--r-- | drivers/rtc/rtc-stm32.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-stm32.c b/drivers/rtc/rtc-stm32.c index d774aa18f57a..75a8924ba12b 100644 --- a/drivers/rtc/rtc-stm32.c +++ b/drivers/rtc/rtc-stm32.c @@ -209,7 +209,7 @@ static irqreturn_t stm32_rtc_alarm_irq(int irq, void *dev_id) const struct stm32_rtc_events *evts = &rtc->data->events; unsigned int status, cr; - mutex_lock(&rtc->rtc_dev->ops_lock); + rtc_lock(rtc->rtc_dev); status = readl_relaxed(rtc->base + regs->sr); cr = readl_relaxed(rtc->base + regs->cr); @@ -226,7 +226,7 @@ static irqreturn_t stm32_rtc_alarm_irq(int irq, void *dev_id) stm32_rtc_clear_event_flags(rtc, evts->alra); } - mutex_unlock(&rtc->rtc_dev->ops_lock); + rtc_unlock(rtc->rtc_dev); return IRQ_HANDLED; } |