summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-hym8563.c
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2021-01-19 23:06:45 +0100
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2021-01-25 23:46:17 +0100
commit92e2c3e61dfbf3473ecb94047aba73e35eb53583 (patch)
tree1e3fa8b32f15d8ae2f127145be7010d09bfa210c /drivers/rtc/rtc-hym8563.c
parent3aa7eaf2383f43727caa20b58c36e7ab36918dc5 (diff)
downloadlinux-92e2c3e61dfbf3473ecb94047aba73e35eb53583.tar.gz
rtc: hym8563: 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-7-alexandre.belloni@bootlin.com
Diffstat (limited to 'drivers/rtc/rtc-hym8563.c')
-rw-r--r--drivers/rtc/rtc-hym8563.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-hym8563.c b/drivers/rtc/rtc-hym8563.c
index 24e0095be058..0751cae27285 100644
--- a/drivers/rtc/rtc-hym8563.c
+++ b/drivers/rtc/rtc-hym8563.c
@@ -428,10 +428,9 @@ static irqreturn_t hym8563_irq(int irq, void *dev_id)
{
struct hym8563 *hym8563 = (struct hym8563 *)dev_id;
struct i2c_client *client = hym8563->client;
- struct mutex *lock = &hym8563->rtc->ops_lock;
int data, ret;
- mutex_lock(lock);
+ rtc_lock(hym8563->rtc);
/* Clear the alarm flag */
@@ -451,7 +450,7 @@ static irqreturn_t hym8563_irq(int irq, void *dev_id)
}
out:
- mutex_unlock(lock);
+ rtc_unlock(hym8563->rtc);
return IRQ_HANDLED;
}