Commit 88ef1c63 authored by Rosen Penev's avatar Rosen Penev Committed by Ulf Hansson
Browse files

mmc: mtd-sd: use devm_platform_ioremap_resource



My guess is some automated tool missed this transformation. Now looks
clearer as do what's happening. Also allows removal of struct resource.

Signed-off-by: default avatarRosen Penev <rosenp@gmail.com>
Link: https://lore.kernel.org/r/20240930224919.355359-3-rosenp@gmail.com


Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 7a2fa8ee
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -2752,7 +2752,6 @@ static int msdc_drv_probe(struct platform_device *pdev)
{
	struct mmc_host *mmc;
	struct msdc_host *host;
	struct resource *res;
	int ret;

	if (!pdev->dev.of_node) {
@@ -2774,12 +2773,9 @@ static int msdc_drv_probe(struct platform_device *pdev)
	if (IS_ERR(host->base))
		return PTR_ERR(host->base);

	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
	if (res) {
		host->top_base = devm_ioremap_resource(&pdev->dev, res);
	host->top_base = devm_platform_ioremap_resource(pdev, 1);
	if (IS_ERR(host->top_base))
		host->top_base = NULL;
	}

	ret = mmc_regulator_get_supply(mmc);
	if (ret)