summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2021-01-20 01:06:50 +0300
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2021-01-26 01:46:17 +0300
commit2dbbedb9b3f6645aa65da2868704e9bea5b8eecc (patch)
tree295f9821930808a65afaa304fe841682de4b28d5 /drivers
parent2a5654fe2bc2abfc2ccc733dbf8f96c7ff7d0fca (diff)
downloadlinux-2dbbedb9b3f6645aa65da2868704e9bea5b8eecc.tar.xz
rtc: rx8010: 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-12-alexandre.belloni@bootlin.com
Diffstat (limited to 'drivers')
-rw-r--r--drivers/rtc/rtc-rx8010.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-rx8010.c b/drivers/rtc/rtc-rx8010.c
index 1a05e4654290..95e751c8048e 100644
--- a/drivers/rtc/rtc-rx8010.c
+++ b/drivers/rtc/rtc-rx8010.c
@@ -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;
}