提交 34ac4509 编写于 作者: Y Yangtao Li 提交者: Ulf Hansson

mmc: sh_mmcif: 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-6-tiny.windzz@gmail.comSigned-off-by: NUlf Hansson <ulf.hansson@linaro.org>
上级 b47c43f6
......@@ -1388,7 +1388,6 @@ static int sh_mmcif_probe(struct platform_device *pdev)
struct sh_mmcif_host *host;
struct device *dev = &pdev->dev;
struct sh_mmcif_plat_data *pd = dev->platform_data;
struct resource *res;
void __iomem *reg;
const char *name;
......@@ -1397,8 +1396,7 @@ static int sh_mmcif_probe(struct platform_device *pdev)
if (irq[0] < 0)
return -ENXIO;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
reg = devm_ioremap_resource(dev, res);
reg = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(reg))
return PTR_ERR(reg);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册