diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2022-09-24 21:18:52 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-09-26 16:10:39 +0100 |
commit | f96087a38cca6f3bb4c7cf582b949016aeb59d0e (patch) | |
tree | d54b9eddf9b161492170a96a4906e6b139b3018b /drivers/spi | |
parent | a6bfc42f30d11f22d2dacb2362d6069643b15393 (diff) | |
download | linux-f96087a38cca6f3bb4c7cf582b949016aeb59d0e.tar.bz2 |
spi: spi-fsl-dspi: Use devm_platform_get_and_ioremap_resource()
Use the devm_platform_get_and_ioremap_resource() helper instead of calling
platform_get_resource() and devm_ioremap_resource() separately.
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220924131854.964923-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-fsl-dspi.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c index fd004c9db9dc..a33e547b7d39 100644 --- a/drivers/spi/spi-fsl-dspi.c +++ b/drivers/spi/spi-fsl-dspi.c @@ -1294,8 +1294,7 @@ static int dspi_probe(struct platform_device *pdev) else ctlr->bits_per_word_mask = SPI_BPW_RANGE_MASK(4, 16); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(&pdev->dev, res); + base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(base)) { ret = PTR_ERR(base); goto out_ctlr_put; |