Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+2 -3
+2 -3
drivers/rtc/rtc-hym8563.c
··· 428 428 { 429 429 struct hym8563 *hym8563 = (struct hym8563 *)dev_id; 430 430 struct i2c_client *client = hym8563->client; 431 - struct mutex *lock = &hym8563->rtc->ops_lock; 432 431 int data, ret; 433 432 434 - mutex_lock(lock); 433 + rtc_lock(hym8563->rtc); 435 434 436 435 /* Clear the alarm flag */ 437 436 ··· 450 451 } 451 452 452 453 out: 453 - mutex_unlock(lock); 454 + rtc_unlock(hym8563->rtc); 454 455 return IRQ_HANDLED; 455 456 } 456 457