Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: sdhci-s3c: convert to devm_platform_ioremap_resource

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Link: https://lore.kernel.org/r/20191215175120.3290-4-tiny.windzz@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Yangtao Li and committed by
Ulf Hansson
09938ce8 e10e54a6

+1 -3
+1 -3
drivers/mmc/host/sdhci-s3c.c
··· 480 480 struct device *dev = &pdev->dev; 481 481 struct sdhci_host *host; 482 482 struct sdhci_s3c *sc; 483 - struct resource *res; 484 483 int ret, irq, ptr, clks; 485 484 486 485 if (!pdev->dev.platform_data && !pdev->dev.of_node) { ··· 552 553 goto err_no_busclks; 553 554 } 554 555 555 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 556 - host->ioaddr = devm_ioremap_resource(&pdev->dev, res); 556 + host->ioaddr = devm_platform_ioremap_resource(pdev, 0); 557 557 if (IS_ERR(host->ioaddr)) { 558 558 ret = PTR_ERR(host->ioaddr); 559 559 goto err_req_regs;