net: mv643xx_eth: use managed devm_ioremap for port registers
authorSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Wed, 29 May 2013 09:32:44 +0000 (09:32 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 31 May 2013 00:54:03 +0000 (17:54 -0700)
Make use of managed devm_ioremap and remove corresponding iounmap.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mv643xx_eth.c

index 8124464af83cd9c027df38e559988f04f5b0c64a..3417847b84856b3fe4412caedcf6db70193aeb87 100644 (file)
@@ -2470,7 +2470,7 @@ static int mv643xx_eth_shared_probe(struct platform_device *pdev)
        if (msp == NULL)
                return -ENOMEM;
 
-       msp->base = ioremap(res->start, resource_size(res));
+       msp->base = devm_ioremap(&pdev->dev, res->start, resource_size(res));
        if (msp->base == NULL)
                return -ENOMEM;
 
@@ -2498,7 +2498,6 @@ static int mv643xx_eth_shared_remove(struct platform_device *pdev)
 {
        struct mv643xx_eth_shared_private *msp = platform_get_drvdata(pdev);
 
-       iounmap(msp->base);
        if (!IS_ERR(msp->clk))
                clk_disable_unprepare(msp->clk);