]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
net: bcmgenet: Use devm_ioremap_resource()
authorFabio Estevam <fabio.estevam@freescale.com>
Mon, 24 Feb 2014 03:47:24 +0000 (00:47 -0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Feb 2014 00:28:56 +0000 (19:28 -0500)
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>
drivers/net/ethernet/broadcom/genet/bcmgenet.c

index 0ebc29769510c267967a0187c7d482fb6491b087..844e0811388d2bea46a291f9428a933353a90b92 100644 (file)
@@ -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;
        }