diff options
Diffstat (limited to 'drivers/net/ethernet/sun/niu.c')
-rw-r--r-- | drivers/net/ethernet/sun/niu.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c index 95cff98d8a34..fa322409bff3 100644 --- a/drivers/net/ethernet/sun/niu.c +++ b/drivers/net/ethernet/sun/niu.c | |||
@@ -10108,7 +10108,7 @@ static int niu_of_probe(struct platform_device *op) | |||
10108 | goto err_out_iounmap; | 10108 | goto err_out_iounmap; |
10109 | } | 10109 | } |
10110 | 10110 | ||
10111 | dev_set_drvdata(&op->dev, dev); | 10111 | platform_set_drvdata(op, dev); |
10112 | 10112 | ||
10113 | niu_device_announce(np); | 10113 | niu_device_announce(np); |
10114 | 10114 | ||
@@ -10145,7 +10145,7 @@ err_out: | |||
10145 | 10145 | ||
10146 | static int niu_of_remove(struct platform_device *op) | 10146 | static int niu_of_remove(struct platform_device *op) |
10147 | { | 10147 | { |
10148 | struct net_device *dev = dev_get_drvdata(&op->dev); | 10148 | struct net_device *dev = platform_get_drvdata(op); |
10149 | 10149 | ||
10150 | if (dev) { | 10150 | if (dev) { |
10151 | struct niu *np = netdev_priv(dev); | 10151 | struct niu *np = netdev_priv(dev); |
@@ -10175,7 +10175,6 @@ static int niu_of_remove(struct platform_device *op) | |||
10175 | niu_put_parent(np); | 10175 | niu_put_parent(np); |
10176 | 10176 | ||
10177 | free_netdev(dev); | 10177 | free_netdev(dev); |
10178 | dev_set_drvdata(&op->dev, NULL); | ||
10179 | } | 10178 | } |
10180 | return 0; | 10179 | return 0; |
10181 | } | 10180 | } |