diff options
Diffstat (limited to 'drivers/net/ethernet/wiznet/w5100.c')
-rw-r--r-- | drivers/net/ethernet/wiznet/w5100.c | 9 |
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) | |||
641 | if (!mem) | 641 | if (!mem) |
642 | return -ENXIO; | 642 | return -ENXIO; |
643 | mem_size = resource_size(mem); | 643 | mem_size = resource_size(mem); |
644 | if (!devm_request_mem_region(&pdev->dev, mem->start, mem_size, name)) | 644 | |
645 | return -EBUSY; | 645 | priv->base = devm_ioremap_resource(&pdev->dev, mem); |
646 | priv->base = devm_ioremap(&pdev->dev, mem->start, mem_size); | 646 | if (IS_ERR(priv->base)) |
647 | if (!priv->base) | 647 | return PTR_ERR(priv->base); |
648 | return -EBUSY; | ||
649 | 648 | ||
650 | spin_lock_init(&priv->reg_lock); | 649 | spin_lock_init(&priv->reg_lock); |
651 | priv->indirect = mem_size < W5100_BUS_DIRECT_SIZE; | 650 | priv->indirect = mem_size < W5100_BUS_DIRECT_SIZE; |