Commit 1cfb7c28 authored by Yangtao Li's avatar Yangtao Li Committed by Ulf Hansson

mmc: tmio: convert to devm_platform_ioremap_resource

Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: default avatarYangtao Li <tiny.windzz@gmail.com>
Reviewed-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20191215175120.3290-2-tiny.windzz@gmail.comSigned-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent c5c52c37
......@@ -1109,12 +1109,10 @@ struct tmio_mmc_host *tmio_mmc_host_alloc(struct platform_device *pdev,
{
struct tmio_mmc_host *host;
struct mmc_host *mmc;
struct resource *res;
void __iomem *ctl;
int ret;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
ctl = devm_ioremap_resource(&pdev->dev, res);
ctl = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(ctl))
return ERR_CAST(ctl);
......
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