mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
rtc: stm32: remove one condition check in stm32_rtc_set_alarm()
A condition check was repeated in this function implementation despite of a corresponding check in the stm32_rtc_alarm_irq_enable() function. Thus delete redundant source code here. This issue was detected by using the Coccinelle software. Suggested-by: Russell King <[email protected]> Signed-off-by: Markus Elfring <[email protected]> Reviewed-by: Amelie Delaunay <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
This commit is contained in:
parent
f2f5cb6a73
commit
fe63604c63
1 changed files with 1 additions and 5 deletions
|
|
@ -519,11 +519,7 @@ static int stm32_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
|
|||
/* Write to Alarm register */
|
||||
writel_relaxed(alrmar, rtc->base + regs->alrmar);
|
||||
|
||||
if (alrm->enabled)
|
||||
stm32_rtc_alarm_irq_enable(dev, 1);
|
||||
else
|
||||
stm32_rtc_alarm_irq_enable(dev, 0);
|
||||
|
||||
stm32_rtc_alarm_irq_enable(dev, alrm->enabled);
|
||||
end:
|
||||
stm32_rtc_wpr_lock(rtc);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue