Commit aa857326 authored by Li Zetao's avatar Li Zetao Committed by Ulf Hansson
Browse files

mmc: sdhci-st: Use devm_platform_ioremap_resource_byname()



Convert platform_get_resource_byname() + devm_ioremap_resource() to a
single call to devm_platform_ioremap_resource_byname(), as this is
exactly what this function does.

Signed-off-by: default avatarLi Zetao <lizetao1@huawei.com>
Acked-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230802094028.976612-1-lizetao1@huawei.com


Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 90ecc29a
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -348,7 +348,6 @@ static int sdhci_st_probe(struct platform_device *pdev)
	struct clk *clk, *icnclk;
	int ret = 0;
	u16 host_version;
	struct resource *res;
	struct reset_control *rstc;

	clk =  devm_clk_get(&pdev->dev, "mmc");
@@ -397,9 +396,7 @@ static int sdhci_st_probe(struct platform_device *pdev)
	}

	/* Configure the FlashSS Top registers for setting eMMC TX/RX delay */
	res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
					   "top-mmc-delay");
	pdata->top_ioaddr = devm_ioremap_resource(&pdev->dev, res);
	pdata->top_ioaddr = devm_platform_ioremap_resource_byname(pdev, "top-mmc-delay");
	if (IS_ERR(pdata->top_ioaddr))
		pdata->top_ioaddr = NULL;