diff options
author | Yangtao Li <frank.li@vivo.com> | 2023-07-04 11:58:08 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2023-07-20 20:21:30 +0200 |
commit | 1f2a4d506f47200550b1dbf9e77e2a3d0ffec7b2 (patch) | |
tree | a9ba85977c7b827b6c7956ee102ecfff720fe518 /drivers/iio | |
parent | iio: adc: qcom-spmi-adc5: Add ADC5_GPIO2_100K_PU (diff) | |
download | linux-1f2a4d506f47200550b1dbf9e77e2a3d0ffec7b2.tar.xz linux-1f2a4d506f47200550b1dbf9e77e2a3d0ffec7b2.zip |
iio: adc: stm32-adc: Use devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230704095808.33780-1-frank.li@vivo.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/adc/stm32-adc-core.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/iio/adc/stm32-adc-core.c b/drivers/iio/adc/stm32-adc-core.c index 48f02dcc81c1..99062a0ba1d9 100644 --- a/drivers/iio/adc/stm32-adc-core.c +++ b/drivers/iio/adc/stm32-adc-core.c @@ -723,8 +723,7 @@ static int stm32_adc_probe(struct platform_device *pdev) priv->nb_adc_max = priv->cfg->num_adcs; spin_lock_init(&priv->common.lock); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->common.base = devm_ioremap_resource(&pdev->dev, res); + priv->common.base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(priv->common.base)) return PTR_ERR(priv->common.base); priv->common.phys_base = res->start; |