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>
This commit is contained in:
parent
a6bfc42f30
commit
f96087a38c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user