Skip to content

Commit 99b594d

Browse files
hujun260anchao
authored andcommitted
max32660_rtc: change spinlock name g_lock -> g_rtc_lock
Signed-off-by: hujun5 <[email protected]>
1 parent a4da079 commit 99b594d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

arch/arm/src/max326xx/max32660/max32660_rtc.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ static alm_callback_t g_alarmcb;
8080
static void *g_alarmarg;
8181
#endif
8282

83-
static spinlock_t lock = SP_UNLOCKED;
83+
static spinlock_t g_rtc_lock = SP_UNLOCKED;
8484

8585
/****************************************************************************
8686
* Public Data
@@ -461,7 +461,7 @@ int up_rtc_settime(const struct timespec *tp)
461461

462462
/* Enable write access to RTC configuration registers */
463463

464-
flags = spin_lock_irqsave(&lock);
464+
flags = spin_lock_irqsave(&g_rtc_lock);
465465
max326_rtc_wrenable(true);
466466

467467
/* We need to disable the RTC in order to write to the SEC and SSEC
@@ -485,7 +485,7 @@ int up_rtc_settime(const struct timespec *tp)
485485
max326_rtc_enable(true);
486486
max326_rtc_wrenable(false);
487487

488-
spin_unlock_irqrestore(&lock, flags);
488+
spin_unlock_irqrestore(&g_rtc_lock, flags);
489489
return OK;
490490
}
491491

@@ -524,7 +524,7 @@ int max326_rtc_setalarm(struct timespec *ts,
524524

525525
/* Is there already something waiting on the ALARM? */
526526

527-
flags = spin_lock_irqsave(&lock);
527+
flags = spin_lock_irqsave(&g_rtc_lock);
528528
if (g_alarmcb == NULL)
529529
{
530530
/* Get the time as a fixed precision number.
@@ -619,7 +619,7 @@ int max326_rtc_setalarm(struct timespec *ts,
619619
}
620620

621621
errout_with_lock:
622-
spin_unlock_irqrestore(&lock, flags);
622+
spin_unlock_irqrestore(&g_rtc_lock, flags);
623623
return ret;
624624
}
625625
#endif
@@ -719,7 +719,7 @@ int max326_rtc_cancelalarm(void)
719719
uint32_t regval;
720720
int ret = -ENODATA;
721721

722-
flags = spin_lock_irqsave(&lock);
722+
flags = spin_lock_irqsave(&g_rtc_lock);
723723

724724
if (g_alarmcb != NULL)
725725
{
@@ -747,7 +747,7 @@ int max326_rtc_cancelalarm(void)
747747
ret = OK;
748748
}
749749

750-
spin_unlock_irqrestore(&lock, flags);
750+
spin_unlock_irqrestore(&g_rtc_lock, flags);
751751
return ret;
752752
}
753753
#endif

0 commit comments

Comments
 (0)