net: xilinx_emaclite: use platform_{get,set}_drvdata()
authorLibo Chen <clbchenlibo.chen@huawei.com>
Mon, 19 Aug 2013 12:00:25 +0000 (20:00 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 21 Aug 2013 00:18:02 +0000 (17:18 -0700)
Use the wrapper functions for getting and setting the driver data using
platform_device instead of using dev_{get,set}_drvdata() with &of_dev->dev,
so we can directly pass a struct platform_device.

Signed-off-by: Libo Chen <libo.chen@huawei.com>
Acked-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/xilinx/xilinx_emaclite.c

index fd4dbdae5331a3cf31732d9691a1356b7d1abf1c..7c1ccbcb47be230009fb86ee259dcfb1f68df848 100644 (file)
@@ -1230,8 +1230,7 @@ error:
  */
 static int xemaclite_of_remove(struct platform_device *of_dev)
 {
-       struct device *dev = &of_dev->dev;
-       struct net_device *ndev = dev_get_drvdata(dev);
+       struct net_device *ndev = platform_get_drvdata(of_dev);
 
        struct net_local *lp = netdev_priv(ndev);