Commit 2dbbedb9 authored by Alexandre Belloni's avatar Alexandre Belloni

rtc: rx8010: 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-12-alexandre.belloni@bootlin.com
parent 2a5654fe
......@@ -73,11 +73,11 @@ static irqreturn_t rx8010_irq_1_handler(int irq, void *dev_id)
struct rx8010_data *rx8010 = i2c_get_clientdata(client);
int flagreg, err;
mutex_lock(&rx8010->rtc->ops_lock);
rtc_lock(rx8010->rtc);
err = regmap_read(rx8010->regs, RX8010_FLAG, &flagreg);
if (err) {
mutex_unlock(&rx8010->rtc->ops_lock);
rtc_unlock(rx8010->rtc);
return IRQ_NONE;
}
......@@ -100,7 +100,7 @@ static irqreturn_t rx8010_irq_1_handler(int irq, void *dev_id)
}
err = regmap_write(rx8010->regs, RX8010_FLAG, flagreg);
mutex_unlock(&rx8010->rtc->ops_lock);
rtc_unlock(rx8010->rtc);
return err ? IRQ_NONE : 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