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

mmc: sdhci_f_sdh30: 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-7-tiny.windzz@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Yangtao Li and committed by
Ulf Hansson
dbf90a17 34ac4509

+1 -3
+1 -3
drivers/mmc/host/sdhci_f_sdh30.c
··· 89 89 { 90 90 struct sdhci_host *host; 91 91 struct device *dev = &pdev->dev; 92 - struct resource *res; 93 92 int irq, ctrl = 0, ret = 0; 94 93 struct f_sdhost_priv *priv; 95 94 u32 reg = 0; ··· 122 123 host->ops = &sdhci_f_sdh30_ops; 123 124 host->irq = irq; 124 125 125 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 126 - host->ioaddr = devm_ioremap_resource(&pdev->dev, res); 126 + host->ioaddr = devm_platform_ioremap_resource(pdev, 0); 127 127 if (IS_ERR(host->ioaddr)) { 128 128 ret = PTR_ERR(host->ioaddr); 129 129 goto err;