Skip to content

Commit 1207ccf

Browse files
soburikartben
authored andcommitted
drivers: i2c: dw: Fix the "resets" property exists check logic
Regardless of the argument specified, it always references the property of the 0th, so it was corrected to reference the instance specified by the argument. Signed-off-by: TOKITA Hiroshi <[email protected]>
1 parent 8c9ac5a commit 1207ccf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/i2c/i2c_dw.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,8 +1140,8 @@ static int i2c_dw_initialize(const struct device *dev)
11401140
#endif
11411141

11421142
#if defined(CONFIG_RESET)
1143-
#define RESET_DW_CONFIG(n) \
1144-
IF_ENABLED(DT_INST_NODE_HAS_PROP(0, resets), \
1143+
#define RESET_DW_CONFIG(n) \
1144+
IF_ENABLED(DT_INST_NODE_HAS_PROP(n, resets), \
11451145
(.reset = RESET_DT_SPEC_INST_GET(n),))
11461146
#else
11471147
#define RESET_DW_CONFIG(n)

0 commit comments

Comments
 (0)