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

rtc: pcf2123: 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-10-alexandre.belloni@bootlin.com

+2 -3
+2 -3
drivers/rtc/rtc-pcf2123.c
··· 307 307 static irqreturn_t pcf2123_rtc_irq(int irq, void *dev) 308 308 { 309 309 struct pcf2123_data *pcf2123 = dev_get_drvdata(dev); 310 - struct mutex *lock = &pcf2123->rtc->ops_lock; 311 310 unsigned int val = 0; 312 311 int ret = IRQ_NONE; 313 312 314 - mutex_lock(lock); 313 + rtc_lock(pcf2123->rtc); 315 314 regmap_read(pcf2123->map, PCF2123_REG_CTRL2, &val); 316 315 317 316 /* Alarm? */ ··· 323 324 rtc_update_irq(pcf2123->rtc, 1, RTC_IRQF | RTC_AF); 324 325 } 325 326 326 - mutex_unlock(lock); 327 + rtc_unlock(pcf2123->rtc); 327 328 328 329 return ret; 329 330 }