From 2cd8d279d2ad6f82e73ce2ecc933b25a9308b743 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 13 Feb 2016 19:16:51 -0600 Subject: [PATCH] Missed a few name changes --- arch/arm/src/kl/kl_gpioirq.c | 5 ++++- arch/arm/src/samv7/sam_mcan.c | 23 ++++++++++++----------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/arch/arm/src/kl/kl_gpioirq.c b/arch/arm/src/kl/kl_gpioirq.c index 8aed262431..2b481bce3a 100644 --- a/arch/arm/src/kl/kl_gpioirq.c +++ b/arch/arm/src/kl/kl_gpioirq.c @@ -43,6 +43,7 @@ #include #include +#include #include #include "up_arch.h" @@ -250,7 +251,7 @@ xcpt_t kl_gpioirqattach(uint32_t pinset, xcpt_t pinisr) /* Get the table associated with this port */ DEBUGASSERT(port < KL_NPORTS); - flags = irqsave(); + flags = enter_critical_section(); switch (port) { #ifdef CONFIG_KL_PORTAINTS @@ -264,6 +265,7 @@ xcpt_t kl_gpioirqattach(uint32_t pinset, xcpt_t pinisr) break; #endif default: + leave_critical_section(flags); return NULL; } @@ -274,6 +276,7 @@ xcpt_t kl_gpioirqattach(uint32_t pinset, xcpt_t pinisr) /* And return the old PIN isr address */ + leave_critical_section(flags); return oldisr; #else diff --git a/arch/arm/src/samv7/sam_mcan.c b/arch/arm/src/samv7/sam_mcan.c index 2454ae36bf..7aab5fee3f 100644 --- a/arch/arm/src/samv7/sam_mcan.c +++ b/arch/arm/src/samv7/sam_mcan.c @@ -53,6 +53,7 @@ #include #include +#include #include #include @@ -1460,7 +1461,7 @@ static void mcan_buffer_reserve(FAR struct sam_mcan_s *priv) { /* Get the current queue status and semaphore count. */ - flags = irqsave(); + flags = enter_critical_section(); txfqs1 = mcan_getreg(priv, SAM_MCAN_TXFQS_OFFSET); (void)sem_getvalue(&priv->txfsem, &sval); txfqs2 = mcan_getreg(priv, SAM_MCAN_TXFQS_OFFSET); @@ -1479,7 +1480,7 @@ static void mcan_buffer_reserve(FAR struct sam_mcan_s *priv) * resynchronize, the semaphore count and try again. */ - irqrestore(flags); + leave_critical_section(flags); } /* We only have one useful bit of information in the TXFQS: @@ -1523,7 +1524,7 @@ static void mcan_buffer_reserve(FAR struct sam_mcan_s *priv) /* Bump up the count by one and try again */ sem_post(&priv->txfsem); - irqrestore(flags); + leave_critical_section(flags); continue; } @@ -1531,14 +1532,14 @@ static void mcan_buffer_reserve(FAR struct sam_mcan_s *priv) * decrementing the count. */ - irqrestore(flags); + leave_critical_section(flags); return; } /* The semaphore value is reasonable. Wait for the next TC interrupt. */ ret = sem_wait(&priv->txfsem); - irqrestore(flags); + leave_critical_section(flags); DEBUGASSERT(ret == 0 || errno == EINTR); } while (ret < 0); @@ -2301,7 +2302,7 @@ static void mcan_rxint(FAR struct can_dev_s *dev, bool enable) /* Enable/disable the receive interrupts */ - flags = irqsave(); + flags = enter_critical_section(); regval = mcan_getreg(priv, SAM_MCAN_IE_OFFSET); if (enable) @@ -2314,7 +2315,7 @@ static void mcan_rxint(FAR struct can_dev_s *dev, bool enable) } mcan_putreg(priv, SAM_MCAN_IE_OFFSET, regval); - irqrestore(flags); + leave_critical_section(flags); } /**************************************************************************** @@ -2343,7 +2344,7 @@ static void mcan_txint(FAR struct can_dev_s *dev, bool enable) /* Enable/disable the receive interrupts */ - flags = irqsave(); + flags = enter_critical_section(); regval = mcan_getreg(priv, SAM_MCAN_IE_OFFSET); if (enable) @@ -2356,7 +2357,7 @@ static void mcan_txint(FAR struct can_dev_s *dev, bool enable) } mcan_putreg(priv, SAM_MCAN_IE_OFFSET, regval); - irqrestore(flags); + leave_critical_section(flags); } /**************************************************************************** @@ -2466,7 +2467,7 @@ static int mcan_ioctl(FAR struct can_dev_s *dev, int cmd, unsigned long arg) /* Save the value of the new bit timing register */ - flags = irqsave(); + flags = enter_critical_section(); priv->btp = MCAN_BTP_BRP(brp) | MCAN_BTP_TSEG1(tseg1) | MCAN_BTP_TSEG2(tseg2) | MCAN_BTP_SJW(sjw); @@ -2502,7 +2503,7 @@ static int mcan_ioctl(FAR struct can_dev_s *dev, int cmd, unsigned long arg) mcan_putreg(priv, SAM_MCAN_IE_OFFSET, ie & ~priv->txints); } - irqrestore(flags); + leave_critical_section(flags); } break;