Skip to content

Commit bf8cfa7

Browse files
anoblikartben
authored andcommitted
pinctrl: Fix usage of PINCTRL_DT_DEFINE with C++
Using PINCTRL_DT_DEFINE from a C++ file cause a "designator order field" error. This updates Z_PINCTRL_STATE_INIT to respect the same order as defined in struct pinctrl_state. Signed-off-by: Alexandre Bailon <[email protected]>
1 parent 7c4abb1 commit bf8cfa7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/zephyr/drivers/pinctrl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,10 @@ struct pinctrl_dev_config {
157157
#define Z_PINCTRL_STATE_INIT(state_idx, node_id) \
158158
COND_CODE_1(Z_PINCTRL_SKIP_STATE(state_idx, node_id), (), \
159159
({ \
160-
.id = Z_PINCTRL_STATE_ID(state_idx, node_id), \
161160
.pins = Z_PINCTRL_STATE_PINS_NAME(state_idx, node_id), \
162161
.pin_cnt = ARRAY_SIZE(Z_PINCTRL_STATE_PINS_NAME(state_idx, \
163-
node_id)) \
162+
node_id)), \
163+
.id = Z_PINCTRL_STATE_ID(state_idx, node_id) \
164164
}))
165165

166166
/**

0 commit comments

Comments
 (0)