drivers: led: pwm: use DT_INST_FOREACH_CHILD_SEP

Remove the need for auxiliary macros by using DT_INST_FOREACH_CHILD_SEP.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2022-07-05 16:58:00 +02:00 committed by Carles Cufí
commit 44552df4f5

View file

@ -131,12 +131,10 @@ static const struct led_driver_api led_pwm_api = {
.set_brightness = led_pwm_set_brightness,
};
#define PWM_DT_SPEC_GET_AND_COMMA(node_id) PWM_DT_SPEC_GET(node_id),
#define LED_PWM_DEVICE(id) \
\
static const struct pwm_dt_spec led_pwm_##id[] = { \
DT_INST_FOREACH_CHILD(id, PWM_DT_SPEC_GET_AND_COMMA) \
DT_INST_FOREACH_CHILD_SEP(id, PWM_DT_SPEC_GET, (,)) \
}; \
\
static const struct led_pwm_config led_pwm_config_##id = { \