Commit d1b44ce1 authored by Jingoo Han's avatar Jingoo Han Committed by David S. Miller

net: w5300: Use devm_ioremap_resource()

Use devm_ioremap_resource() in order to make the code simpler.
Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 52f1454f
...@@ -561,11 +561,10 @@ static int w5300_hw_probe(struct platform_device *pdev) ...@@ -561,11 +561,10 @@ static int w5300_hw_probe(struct platform_device *pdev)
if (!mem) if (!mem)
return -ENXIO; return -ENXIO;
mem_size = resource_size(mem); mem_size = resource_size(mem);
if (!devm_request_mem_region(&pdev->dev, mem->start, mem_size, name))
return -EBUSY; priv->base = devm_ioremap_resource(&pdev->dev, mem);
priv->base = devm_ioremap(&pdev->dev, mem->start, mem_size); if (IS_ERR(priv->base))
if (!priv->base) return PTR_ERR(priv->base);
return -EBUSY;
spin_lock_init(&priv->reg_lock); spin_lock_init(&priv->reg_lock);
priv->indirect = mem_size < W5300_BUS_DIRECT_SIZE; priv->indirect = mem_size < W5300_BUS_DIRECT_SIZE;
......
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