Commit f66e7f2d authored by Alexandre Belloni's avatar Alexandre Belloni

rtc: stm32: use rtc_lock/rtc_unlock

Avoid accessing directly rtc->ops_lock and use the RTC core helpers.
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210119220653.677750-14-alexandre.belloni@bootlin.com
parent 31247546
...@@ -209,7 +209,7 @@ static irqreturn_t stm32_rtc_alarm_irq(int irq, void *dev_id) ...@@ -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; const struct stm32_rtc_events *evts = &rtc->data->events;
unsigned int status, cr; unsigned int status, cr;
mutex_lock(&rtc->rtc_dev->ops_lock); rtc_lock(rtc->rtc_dev);
status = readl_relaxed(rtc->base + regs->sr); status = readl_relaxed(rtc->base + regs->sr);
cr = readl_relaxed(rtc->base + regs->cr); cr = readl_relaxed(rtc->base + regs->cr);
...@@ -226,7 +226,7 @@ static irqreturn_t stm32_rtc_alarm_irq(int irq, void *dev_id) ...@@ -226,7 +226,7 @@ static irqreturn_t stm32_rtc_alarm_irq(int irq, void *dev_id)
stm32_rtc_clear_event_flags(rtc, evts->alra); stm32_rtc_clear_event_flags(rtc, evts->alra);
} }
mutex_unlock(&rtc->rtc_dev->ops_lock); rtc_unlock(rtc->rtc_dev);
return IRQ_HANDLED; return IRQ_HANDLED;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment