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

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

+3 -3
+3 -3
drivers/rtc/rtc-asm9260.c
··· 116 116 u32 isr; 117 117 unsigned long events = 0; 118 118 119 - mutex_lock(&priv->rtc->ops_lock); 119 + rtc_lock(priv->rtc); 120 120 isr = ioread32(priv->iobase + HW_CIIR); 121 121 if (!isr) { 122 - mutex_unlock(&priv->rtc->ops_lock); 122 + rtc_unlock(priv->rtc); 123 123 return IRQ_NONE; 124 124 } 125 125 126 126 iowrite32(0, priv->iobase + HW_CIIR); 127 - mutex_unlock(&priv->rtc->ops_lock); 127 + rtc_unlock(priv->rtc); 128 128 129 129 events |= RTC_AF | RTC_IRQF; 130 130