From 91e39d5ee7e100620e0bafeeb51d8a1555da3d2d Mon Sep 17 00:00:00 2001 From: Thomas Schmid Date: Wed, 18 Dec 2019 18:15:08 +0100 Subject: [PATCH] drivers: adc: adc_stm32: fix clock setup Fix clock setup for stm32 f3, l4, wb and g4 series. The macro __LL_ADC_COMMON_INSTANCE() is called without argument, which leads to a compile error. Fix by passing adc parameter. Signed-off-by: Thomas Schmid --- drivers/adc/adc_stm32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/adc/adc_stm32.c b/drivers/adc/adc_stm32.c index eeac46fd5ef..f67e1d29e26 100644 --- a/drivers/adc/adc_stm32.c +++ b/drivers/adc/adc_stm32.c @@ -532,7 +532,7 @@ static int adc_stm32_init(struct device *dev) defined(CONFIG_SOC_SERIES_STM32L4X) || \ defined(CONFIG_SOC_SERIES_STM32WBX) || \ defined(CONFIG_SOC_SERIES_STM32G4X) - LL_ADC_SetCommonClock(__LL_ADC_COMMON_INSTANCE(), + LL_ADC_SetCommonClock(__LL_ADC_COMMON_INSTANCE(adc), LL_ADC_CLOCK_SYNC_PCLK_DIV4); #endif