提交 1cfb7c28 编写于 作者: Y Yangtao Li 提交者: Ulf Hansson

mmc: tmio: convert to devm_platform_ioremap_resource

Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: NYangtao Li <tiny.windzz@gmail.com>
Reviewed-by: NWolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: NWolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20191215175120.3290-2-tiny.windzz@gmail.comSigned-off-by: NUlf Hansson <ulf.hansson@linaro.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册