summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/wiznet
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2014-02-28 14:48:16 +0900
committerDavid S. Miller <davem@davemloft.net>2014-02-28 16:57:24 -0500
commit4e76ca7f3e4c4b100f19b1bdfc1ed2b541d045e2 (patch)
tree941125b676e1325ed8b7b1c0f33d51d7e1e756be /drivers/net/ethernet/wiznet
parentd1b44ce1a37ee667dfdd0770c6f0b08dae7ebad8 (diff)
downloadtalos-obmc-linux-4e76ca7f3e4c4b100f19b1bdfc1ed2b541d045e2.tar.gz
talos-obmc-linux-4e76ca7f3e4c4b100f19b1bdfc1ed2b541d045e2.zip
net: w5100: Use devm_ioremap_resource()
Use devm_ioremap_resource() in order to make the code simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/wiznet')
-rw-r--r--drivers/net/ethernet/wiznet/w5100.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/ethernet/wiznet/w5100.c b/drivers/net/ethernet/wiznet/w5100.c
index 0df36c6ec7f4..104d46f37969 100644
--- a/drivers/net/ethernet/wiznet/w5100.c
+++ b/drivers/net/ethernet/wiznet/w5100.c
@@ -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;
OpenPOWER on IntegriCloud