summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2014-02-24 00:47:24 -0300
committerDavid S. Miller <davem@davemloft.net>2014-02-24 19:28:56 -0500
commit5343a10d15362da46877d8f07b7c23d4c95f8277 (patch)
tree1cf365c969bf9d9a22d5848debf3ae2230df0cb4 /drivers/net/ethernet/broadcom
parent04091142826e5823e31cc6418942ac447b3edb0a (diff)
net: bcmgenet: Use devm_ioremap_resource()
According to Documentation/driver-model/devres.txt, devm_request_and_ioremap() is deprecated, so use devm_ioremap_resource() instead. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom')
-rw-r--r--drivers/net/ethernet/broadcom/genet/bcmgenet.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
index 0ebc2976951..844e0811388 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -2481,10 +2481,9 @@ static int bcmgenet_probe(struct platform_device *pdev)
}
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- priv->base = devm_request_and_ioremap(&pdev->dev, r);
- if (!priv->base) {
- dev_err(&pdev->dev, "can't ioremap\n");
- err = -EINVAL;
+ priv->base = devm_ioremap_resource(&pdev->dev, r);
+ if (IS_ERR(priv->base)) {
+ err = PTR_ERR(priv->base);
goto err;
}