diff options
author | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2021-01-19 23:06:44 +0100 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2021-01-25 23:46:17 +0100 |
commit | 3aa7eaf2383f43727caa20b58c36e7ab36918dc5 (patch) | |
tree | d28c90980e96cb7294578d09eaf1957e5f3f90de /drivers/rtc | |
parent | 811c79166028f732a571a32af2ee68195f6b0a04 (diff) | |
download | linux-3aa7eaf2383f43727caa20b58c36e7ab36918dc5.tar.bz2 |
rtc: ds3232: 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-6-alexandre.belloni@bootlin.com
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-ds3232.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c index 16b89035d135..535e4a88fbb6 100644 --- a/drivers/rtc/rtc-ds3232.c +++ b/drivers/rtc/rtc-ds3232.c @@ -406,11 +406,10 @@ static irqreturn_t ds3232_irq(int irq, void *dev_id) { struct device *dev = dev_id; struct ds3232 *ds3232 = dev_get_drvdata(dev); - struct mutex *lock = &ds3232->rtc->ops_lock; int ret; int stat, control; - mutex_lock(lock); + rtc_lock(ds3232->rtc); ret = regmap_read(ds3232->regmap, DS3232_REG_SR, &stat); if (ret) @@ -448,7 +447,7 @@ static irqreturn_t ds3232_irq(int irq, void *dev_id) } unlock: - mutex_unlock(lock); + rtc_unlock(ds3232->rtc); return IRQ_HANDLED; } |