Skip to content

Commit

Permalink
drivers: i2c: dw: Fix the "resets" property exists check logic
Browse files Browse the repository at this point in the history
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 <tokita.hiroshi@gmail.com>
  • Loading branch information
soburi authored and kartben committed Dec 26, 2024
1 parent 8c9ac5a commit 1207ccf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/i2c/i2c_dw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1140,8 +1140,8 @@ static int i2c_dw_initialize(const struct device *dev)
#endif

#if defined(CONFIG_RESET)
#define RESET_DW_CONFIG(n) \
IF_ENABLED(DT_INST_NODE_HAS_PROP(0, resets), \
#define RESET_DW_CONFIG(n) \
IF_ENABLED(DT_INST_NODE_HAS_PROP(n, resets), \
(.reset = RESET_DT_SPEC_INST_GET(n),))
#else
#define RESET_DW_CONFIG(n)
Expand Down

0 comments on commit 1207ccf

Please sign in to comment.