Skip to content

Commit 288b7ba

Browse files
Yang LiUlf Hansson
authored andcommitted
mmc: sdhci-of-aspeed: Use devm_platform_get_and_ioremap_resource()
According to commit 890cc39 ("drivers: provide 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: Yang Li <yang.lee@linux.alibaba.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/20230315055023.61779-1-yang.lee@linux.alibaba.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent c66c55b commit 288b7ba

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/mmc/host/sdhci-of-aspeed.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,8 +547,7 @@ static int aspeed_sdc_probe(struct platform_device *pdev)
547547
return ret;
548548
}
549549

550-
sdc->res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
551-
sdc->regs = devm_ioremap_resource(&pdev->dev, sdc->res);
550+
sdc->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &sdc->res);
552551
if (IS_ERR(sdc->regs)) {
553552
ret = PTR_ERR(sdc->regs);
554553
goto err_clk;

0 commit comments

Comments
 (0)