renesas/rx65n: Replace spinlock/sched_lock with spin_lock_irqsave_nopreempt

Replace the spinlock/sched_lock pair in renesas/rx65n with
    spin_lock_irqsave_nopreempt() to improve code clarity and consistency.

Signed-off-by: Chengdong Wang wangchengdong@lixiang.com
This commit is contained in:
wangchengdong
2025-11-04 13:27:06 +08:00
committed by Xiang Xiao
parent 6c28a2b749
commit 53dd00328d

View File

@@ -480,8 +480,7 @@ int up_rtc_gettime(struct timespec *tp)
uint8_t regval;
struct tm t;
flags = spin_lock_irqsave(&g_rtc_lock);
sched_lock();
flags = spin_lock_irqsave_nopreempt(&g_rtc_lock);
if (RTC.RCR2.BIT.START == 0)
{
@@ -549,8 +548,7 @@ int up_rtc_gettime(struct timespec *tp)
UNUSED(mincnt);
UNUSED(seccnt);
spin_unlock_irqrestore(&g_rtc_lock, flags);
sched_unlock();
spin_unlock_irqrestore_nopreempt(&g_rtc_lock, flags);
return OK;
}
#endif