netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] net: emaclite: Not necessary to call devm_iounmap
@ 2013-09-12  7:05 Michal Simek
  2013-09-12  7:05 ` [PATCH 2/2] net: emaclite: Code cleanup Michal Simek
  2013-09-20 18:41 ` [PATCH 1/2] net: emaclite: Not necessary to call devm_iounmap David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Michal Simek @ 2013-09-12  7:05 UTC (permalink / raw)
  To: netdev
  Cc: Michal Simek, David S. Miller, Jens Renner, Libo Chen,
	Greg Kroah-Hartman, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1393 bytes --]

devm_iounmap is called automatically.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
 drivers/net/ethernet/xilinx/xilinx_emaclite.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
index 4c619ea..de39098 100644
--- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
+++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
@@ -1075,14 +1075,9 @@ static int xemaclite_send(struct sk_buff *orig_skb, struct net_device *dev)
  * This function un maps the IO region of the Emaclite device and frees the net
  * device.
  */
-static void xemaclite_remove_ndev(struct net_device *ndev,
-				  struct platform_device *pdev)
+static void xemaclite_remove_ndev(struct net_device *ndev)
 {
 	if (ndev) {
-		struct net_local *lp = netdev_priv(ndev);
-
-		if (lp->base_addr)
-			devm_iounmap(&pdev->dev, lp->base_addr);
 		free_netdev(ndev);
 	}
 }
@@ -1214,7 +1209,7 @@ static int xemaclite_of_probe(struct platform_device *ofdev)
 	return 0;

 error:
-	xemaclite_remove_ndev(ndev, ofdev);
+	xemaclite_remove_ndev(ndev);
 	return rc;
 }

@@ -1248,7 +1243,7 @@ static int xemaclite_of_remove(struct platform_device *of_dev)
 		of_node_put(lp->phy_node);
 	lp->phy_node = NULL;

-	xemaclite_remove_ndev(ndev, of_dev);
+	xemaclite_remove_ndev(ndev);

 	return 0;
 }
--
1.8.2.3


[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-09-20 18:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-12  7:05 [PATCH 1/2] net: emaclite: Not necessary to call devm_iounmap Michal Simek
2013-09-12  7:05 ` [PATCH 2/2] net: emaclite: Code cleanup Michal Simek
2013-09-20 18:41   ` David Miller
2013-09-20 18:41 ` [PATCH 1/2] net: emaclite: Not necessary to call devm_iounmap David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).