From 1207ccfb7e305b74682fb35ef9f9177ba6513cbd Mon Sep 17 00:00:00 2001 From: TOKITA Hiroshi Date: Wed, 25 Dec 2024 02:26:20 +0900 Subject: [PATCH] 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 --- drivers/i2c/i2c_dw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/i2c_dw.c b/drivers/i2c/i2c_dw.c index 83af8bc5857958..2915a79debc669 100644 --- a/drivers/i2c/i2c_dw.c +++ b/drivers/i2c/i2c_dw.c @@ -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)