summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/davicom/dm9000.c
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2018-10-21 23:00:15 +0300
committerDavid S. Miller <davem@davemloft.net>2018-10-22 07:10:12 +0300
commit3fcdaad316f204d6280a65cf80a7c21c9fd499c3 (patch)
treea7b3835c502ae95fe0e3f08d099aa4c2f293a893 /drivers/net/ethernet/davicom/dm9000.c
parentce886a4748aa58fd12280d793305b3d844f202c4 (diff)
downloadlinux-3fcdaad316f204d6280a65cf80a7c21c9fd499c3.tar.xz
net: ethernet: davicom: dm9000: simplify getting .driver_data
We should get 'driver_data' from 'struct device' directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/davicom/dm9000.c')
-rw-r--r--drivers/net/ethernet/davicom/dm9000.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ethernet/davicom/dm9000.c b/drivers/net/ethernet/davicom/dm9000.c
index 50222b7b81f3..0a82fcf16d35 100644
--- a/drivers/net/ethernet/davicom/dm9000.c
+++ b/drivers/net/ethernet/davicom/dm9000.c
@@ -1722,8 +1722,7 @@ out:
static int
dm9000_drv_suspend(struct device *dev)
{
- struct platform_device *pdev = to_platform_device(dev);
- struct net_device *ndev = platform_get_drvdata(pdev);
+ struct net_device *ndev = dev_get_drvdata(dev);
struct board_info *db;
if (ndev) {
@@ -1745,8 +1744,7 @@ dm9000_drv_suspend(struct device *dev)
static int
dm9000_drv_resume(struct device *dev)
{
- struct platform_device *pdev = to_platform_device(dev);
- struct net_device *ndev = platform_get_drvdata(pdev);
+ struct net_device *ndev = dev_get_drvdata(dev);
struct board_info *db = netdev_priv(ndev);
if (ndev) {