提交 4e76ca7f 编写于 作者: J Jingoo Han 提交者: David S. Miller

net: w5100: Use devm_ioremap_resource()

Use devm_ioremap_resource() in order to make the code simpler.
Signed-off-by: NJingoo Han <jg1.han@samsung.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d1b44ce1
......@@ -641,11 +641,10 @@ static int w5100_hw_probe(struct platform_device *pdev)
if (!mem)
return -ENXIO;
mem_size = resource_size(mem);
if (!devm_request_mem_region(&pdev->dev, mem->start, mem_size, name))
return -EBUSY;
priv->base = devm_ioremap(&pdev->dev, mem->start, mem_size);
if (!priv->base)
return -EBUSY;
priv->base = devm_ioremap_resource(&pdev->dev, mem);
if (IS_ERR(priv->base))
return PTR_ERR(priv->base);
spin_lock_init(&priv->reg_lock);
priv->indirect = mem_size < W5100_BUS_DIRECT_SIZE;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册