Commit 73e01ab2 authored by Jisheng Zhang's avatar Jisheng Zhang Committed by Ulf Hansson

mmc: sdhci-pltfm: Use devm_platform_ioremap_resource() to simplify code

devm_platform_ioremap_resource() wraps platform_get_resource() and
devm_ioremap_resource() in a single helper, let's use that helper to
simplify the code.
Signed-off-by: default avatarJisheng Zhang <Jisheng.Zhang@synaptics.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent a9cbd79c
...@@ -118,12 +118,10 @@ struct sdhci_host *sdhci_pltfm_init(struct platform_device *pdev, ...@@ -118,12 +118,10 @@ struct sdhci_host *sdhci_pltfm_init(struct platform_device *pdev,
size_t priv_size) size_t priv_size)
{ {
struct sdhci_host *host; struct sdhci_host *host;
struct resource *iomem;
void __iomem *ioaddr; void __iomem *ioaddr;
int irq, ret; int irq, ret;
iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0); ioaddr = devm_platform_ioremap_resource(pdev, 0);
ioaddr = devm_ioremap_resource(&pdev->dev, iomem);
if (IS_ERR(ioaddr)) { if (IS_ERR(ioaddr)) {
ret = PTR_ERR(ioaddr); ret = PTR_ERR(ioaddr);
goto err; goto err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment