forked from Minki/linux
rtc: ac100: 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/20210125221402.1958484-1-alexandre.belloni@bootlin.com
This commit is contained in:
parent
2f58f5eea8
commit
de490e0580
@ -528,7 +528,7 @@ static irqreturn_t ac100_rtc_irq(int irq, void *data)
|
|||||||
unsigned int val = 0;
|
unsigned int val = 0;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
mutex_lock(&chip->rtc->ops_lock);
|
rtc_lock(chip->rtc);
|
||||||
|
|
||||||
/* read status */
|
/* read status */
|
||||||
ret = regmap_read(regmap, AC100_ALM_INT_STA, &val);
|
ret = regmap_read(regmap, AC100_ALM_INT_STA, &val);
|
||||||
@ -551,7 +551,7 @@ static irqreturn_t ac100_rtc_irq(int irq, void *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
mutex_unlock(&chip->rtc->ops_lock);
|
rtc_unlock(chip->rtc);
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user