[1/7] iio: adc: stm32-dfsdm: fix compatible data use
diff mbox series

Message ID 1519390261-25453-2-git-send-email-fabrice.gasnier@st.com
State New, archived
Headers show
Series
  • iio: adc: stm32-dfsdm: misc fixes and improvements
Related show

Commit Message

Fabrice Gasnier Feb. 23, 2018, 12:50 p.m. UTC
Fix use of compatible data: stm32h7 regmap configuration is statically
used. Rather use regmap_cfg from compatible data.

Fixes: bed73904e76f ("IIO: ADC: add stm32 DFSDM core support")

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
---
 drivers/iio/adc/stm32-dfsdm-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jonathan Cameron Feb. 24, 2018, 12:56 p.m. UTC | #1
On Fri, 23 Feb 2018 13:50:55 +0100
Fabrice Gasnier <fabrice.gasnier@st.com> wrote:

> Fix use of compatible data: stm32h7 regmap configuration is statically
> used. Rather use regmap_cfg from compatible data.
> 
> Fixes: bed73904e76f ("IIO: ADC: add stm32 DFSDM core support")
> 
> Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Applied to the fixes-togreg branch of iio.git

Thanks,

Jonathan

> ---
>  drivers/iio/adc/stm32-dfsdm-core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/adc/stm32-dfsdm-core.c b/drivers/iio/adc/stm32-dfsdm-core.c
> index 6290332..0635f93 100644
> --- a/drivers/iio/adc/stm32-dfsdm-core.c
> +++ b/drivers/iio/adc/stm32-dfsdm-core.c
> @@ -274,7 +274,7 @@ static int stm32_dfsdm_probe(struct platform_device *pdev)
>  
>  	dfsdm->regmap = devm_regmap_init_mmio_clk(&pdev->dev, "dfsdm",
>  						  dfsdm->base,
> -						  &stm32h7_dfsdm_regmap_cfg);
> +						  dev_data->regmap_cfg);
>  	if (IS_ERR(dfsdm->regmap)) {
>  		ret = PTR_ERR(dfsdm->regmap);
>  		dev_err(&pdev->dev, "%s: Failed to allocate regmap: %d\n",

Patch
diff mbox series

diff --git a/drivers/iio/adc/stm32-dfsdm-core.c b/drivers/iio/adc/stm32-dfsdm-core.c
index 6290332..0635f93 100644
--- a/drivers/iio/adc/stm32-dfsdm-core.c
+++ b/drivers/iio/adc/stm32-dfsdm-core.c
@@ -274,7 +274,7 @@  static int stm32_dfsdm_probe(struct platform_device *pdev)
 
 	dfsdm->regmap = devm_regmap_init_mmio_clk(&pdev->dev, "dfsdm",
 						  dfsdm->base,
-						  &stm32h7_dfsdm_regmap_cfg);
+						  dev_data->regmap_cfg);
 	if (IS_ERR(dfsdm->regmap)) {
 		ret = PTR_ERR(dfsdm->regmap);
 		dev_err(&pdev->dev, "%s: Failed to allocate regmap: %d\n",