diff --git a/arch/xtensa/src/esp32/esp32_gpio.c b/arch/xtensa/src/esp32/esp32_gpio.c index e4bfc63699e..c40b6b097a0 100644 --- a/arch/xtensa/src/esp32/esp32_gpio.c +++ b/arch/xtensa/src/esp32/esp32_gpio.c @@ -319,10 +319,17 @@ void esp32_gpioirqinitialize(void) g_gpio_cpuint = esp32_alloc_levelint(1); DEBUGASSERT(g_gpio_cpuint >= 0); + /* Set up to receive peripheral interrupts on the current CPU */ + +#ifdef CONFIG_SMP + cpu = up_cpu_index(); +#else + cpu = 0; +#endif + /* Attach the GPIO peripheral to the allocated CPU interrupt */ up_disable_irq(g_gpio_cpuint); - cpu = up_cpu_index(); esp32_attach_peripheral(cpu, ESP32_PERIPH_CPU_GPIO, g_gpio_cpuint); /* Attach and enable the interrupt handler */ diff --git a/libc/time/lib_calendar2utc.c b/libc/time/lib_calendar2utc.c index 2c2d507d9dc..51a8581af44 100644 --- a/libc/time/lib_calendar2utc.c +++ b/libc/time/lib_calendar2utc.c @@ -45,30 +45,6 @@ #include -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Type Declarations - ****************************************************************************/ - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Public Constant Data - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/