RTC: Fix some errors when RTC debug is enabled

This commit is contained in:
Gregory Nutt 2016-04-03 09:52:25 -06:00
parent 1135ce804d
commit ae95f6cdfd
2 changed files with 5 additions and 5 deletions

2
arch

@ -1 +1 @@
Subproject commit 68a1918ab42332510feca0a2203b768c7bb0c792 Subproject commit c71c24971d1ff233a59a85c7ad65c81bdaeaa60b

View File

@ -175,7 +175,7 @@ static void rtc_alarm_callback(FAR void *priv, int alarmid)
FAR struct rtc_upperhalf_s *upper = (FAR struct rtc_upperhalf_s *)priv; FAR struct rtc_upperhalf_s *upper = (FAR struct rtc_upperhalf_s *)priv;
FAR struct rtc_alarminfo_s *alarminfo; FAR struct rtc_alarminfo_s *alarminfo;
DEBUGASSERT(upper != NULL && id >=0 && ID < CONFIG_RTC_NALARMS); DEBUGASSERT(upper != NULL && alarmid >= 0 && alarmid < CONFIG_RTC_NALARMS);
alarminfo = &upper->alarminfo[alarmid]; alarminfo = &upper->alarminfo[alarmid];
/* Do we think that the alaram is active? It might be due to some /* Do we think that the alaram is active? It might be due to some
@ -365,7 +365,7 @@ static int rtc_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
DEBUGASSERT(alarminfo != NULL); DEBUGASSERT(alarminfo != NULL);
alarmid = alarminfo->id; alarmid = alarminfo->id;
DEBUGASSERT(alarmid >= 0 && alarmid < RTC_NALARMS); DEBUGASSERT(alarmid >= 0 && alarmid < CONFIG_RTC_NALARMS);
/* Is the alarm active? */ /* Is the alarm active? */
@ -428,7 +428,7 @@ static int rtc_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
DEBUGASSERT(alarminfo != NULL); DEBUGASSERT(alarminfo != NULL);
alarmid = alarminfo->id; alarmid = alarminfo->id;
DEBUGASSERT(alarmid >= 0 && alarmid < RTC_NALARMS); DEBUGASSERT(alarmid >= 0 && alarmid < CONFIG_RTC_NALARMS);
/* Is the alarm active? */ /* Is the alarm active? */
@ -484,7 +484,7 @@ static int rtc_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
{ {
int alarmid = (int)arg; int alarmid = (int)arg;
DEBUGASSERT(alarmid >= 0 && alarmid < RTC_NALARMS); DEBUGASSERT(alarmid >= 0 && alarmid < CONFIG_RTC_NALARMS);
if (ops->cancelalarm) if (ops->cancelalarm)
{ {
ret = ops->cancelalarm(upper->lower, alarmid); ret = ops->cancelalarm(upper->lower, alarmid);