spi: rspi: 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/20230706032727.9180-5-frank.li@vivo.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
8c8e947b6b
commit
b778d96797
|
@ -1317,8 +1317,7 @@ static int rspi_probe(struct platform_device *pdev)
|
|||
rspi->ops = ops;
|
||||
rspi->ctlr = ctlr;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
rspi->addr = devm_ioremap_resource(&pdev->dev, res);
|
||||
rspi->addr = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
|
||||
if (IS_ERR(rspi->addr)) {
|
||||
ret = PTR_ERR(rspi->addr);
|
||||
goto error1;
|
||||
|
|
Loading…
Reference in New Issue