From bc097a6fe6463d204864b71d04f29e61d6febfaf Mon Sep 17 00:00:00 2001 From: Jean Nanchen Date: Fri, 6 Jun 2025 11:50:22 +0200 Subject: [PATCH] drivers: i2c: stm32: fix build error after timeout patch Follow-up to PR #88631: fix missing variable declarations introduced in the STM32 I2C LL driver after adding timeouts to blocking loops. The missing declarations caused a build failure when interrupts were disabled (CONFIG_I2C_STM32_INTERRUPT=n). Fixes a regression introduced in #88631. Signed-off-by: Jean Nanchen --- drivers/i2c/i2c_ll_stm32_v2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/i2c/i2c_ll_stm32_v2.c b/drivers/i2c/i2c_ll_stm32_v2.c index 872383e310f..5985c57368c 100644 --- a/drivers/i2c/i2c_ll_stm32_v2.c +++ b/drivers/i2c/i2c_ll_stm32_v2.c @@ -1292,6 +1292,8 @@ int i2c_stm32_transaction(const struct device *dev, #ifndef CONFIG_I2C_STM32_INTERRUPT struct i2c_stm32_data *data = dev->data; + const struct i2c_stm32_config *cfg = dev->config; + I2C_TypeDef *i2c = cfg->i2c; if (ret == -ETIMEDOUT) { if (LL_I2C_IsEnabledReloadMode(i2c)) {