From 3008574d0e43c11cdd40e38e824c229be7574810 Mon Sep 17 00:00:00 2001 From: Gilles DOFFE Date: Mon, 28 Sep 2020 14:37:49 +0200 Subject: [PATCH] cpu/stm32: remove uneeded pm macro tests STM32_PM_STOP and STM32_PM_STANDBY are always defined in periph_cpu.h, Thus it is not needed to test them. Signed-off-by: Gilles DOFFE --- cpu/stm32/periph/pm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cpu/stm32/periph/pm.c b/cpu/stm32/periph/pm.c index d91800414b..5bd90084a0 100644 --- a/cpu/stm32/periph/pm.c +++ b/cpu/stm32/periph/pm.c @@ -108,7 +108,7 @@ void pm_set(unsigned mode) int deep; switch (mode) { -#if defined(STM32_PM_STANDBY) && !defined(CPU_FAM_STM32MP1) +#if !defined(CPU_FAM_STM32MP1) case STM32_PM_STANDBY: PWR_CR_REG &= ~(PM_STOP_CONFIG | PM_STANDBY_CONFIG); PWR_CR_REG |= PM_STANDBY_CONFIG; @@ -131,14 +131,12 @@ void pm_set(unsigned mode) deep = 1; break; #endif -#ifdef STM32_PM_STOP case STM32_PM_STOP: PWR_CR_REG &= ~(PM_STOP_CONFIG | PM_STANDBY_CONFIG); PWR_CR_REG |= PM_STOP_CONFIG; /* Set SLEEPDEEP bit of system control block */ deep = 1; break; -#endif default: deep = 0; break;