1
0
Fork 0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-01-26 18:43:33 -05:00

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
This commit is contained in:
Alexandre Belloni 2021-01-19 23:06:45 +01:00
parent 3aa7eaf238
commit 92e2c3e61d

View file

@ -428,10 +428,9 @@ static irqreturn_t hym8563_irq(int irq, void *dev_id)
{ {
struct hym8563 *hym8563 = (struct hym8563 *)dev_id; struct hym8563 *hym8563 = (struct hym8563 *)dev_id;
struct i2c_client *client = hym8563->client; struct i2c_client *client = hym8563->client;
struct mutex *lock = &hym8563->rtc->ops_lock;
int data, ret; int data, ret;
mutex_lock(lock); rtc_lock(hym8563->rtc);
/* Clear the alarm flag */ /* Clear the alarm flag */
@ -451,7 +450,7 @@ static irqreturn_t hym8563_irq(int irq, void *dev_id)
} }
out: out:
mutex_unlock(lock); rtc_unlock(hym8563->rtc);
return IRQ_HANDLED; return IRQ_HANDLED;
} }