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 <tokita.hiroshi@gmail.com>
This commit is contained in:
TOKITA Hiroshi 2024-12-25 02:26:20 +09:00 committed by Benjamin Cabé
commit 1207ccfb7e

View file

@ -1141,7 +1141,7 @@ static int i2c_dw_initialize(const struct device *dev)
#if defined(CONFIG_RESET) #if defined(CONFIG_RESET)
#define RESET_DW_CONFIG(n) \ #define RESET_DW_CONFIG(n) \
IF_ENABLED(DT_INST_NODE_HAS_PROP(0, resets), \ IF_ENABLED(DT_INST_NODE_HAS_PROP(n, resets), \
(.reset = RESET_DT_SPEC_INST_GET(n),)) (.reset = RESET_DT_SPEC_INST_GET(n),))
#else #else
#define RESET_DW_CONFIG(n) #define RESET_DW_CONFIG(n)