Skip to content

Commit a6464e1

Browse files
Update drivers/comparator/comparator_stm32_comp.c
Co-authored-by: Erwan Gouriou <[email protected]>
1 parent 158ff86 commit a6464e1

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

drivers/comparator/comparator_stm32_comp.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,9 @@ LOG_MODULE_REGISTER(stm32_comp, CONFIG_COMPARATOR_LOG_LEVEL);
4949

5050
#define STM32_COMP_DT_EXTI_LINE_NUMBER(inst) DT_INST_PROP(inst, st_exti_line)
5151

52-
/* Value 0 always relates to the default value of COMP PWRMODE bit field */
53-
#define LL_COMP_POWERMODE_DEFAULT 0
54-
55-
#define STM32_COMP_DT_POWER_MODE(inst) \
56-
CONCAT(LL_COMP_POWERMODE_, DT_INST_STRING_TOKEN_OR(inst, st_power_mode, DEFAULT))
52+
COND_CODE_1(DT_INST_NODE_HAS_PROP(inst, st_power_mode), \
53+
(CONCAT(LL_COMP_POWERMODE_, DT_INST_STRING_TOKEN(inst, st_power_mode)), \
54+
(0))
5755

5856
struct stm32_comp_config {
5957
COMP_TypeDef *comp;

0 commit comments

Comments
 (0)