aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/sb1250-mac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/broadcom/sb1250-mac.c')
-rw-r--r--drivers/net/ethernet/broadcom/sb1250-mac.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/ethernet/broadcom/sb1250-mac.c b/drivers/net/ethernet/broadcom/sb1250-mac.c
index e80bfb60c3ef..c2777712da99 100644
--- a/drivers/net/ethernet/broadcom/sb1250-mac.c
+++ b/drivers/net/ethernet/broadcom/sb1250-mac.c
@@ -2197,7 +2197,7 @@ static const struct net_device_ops sbmac_netdev_ops = {
2197 2197
2198static int sbmac_init(struct platform_device *pldev, long long base) 2198static int sbmac_init(struct platform_device *pldev, long long base)
2199{ 2199{
2200 struct net_device *dev = dev_get_drvdata(&pldev->dev); 2200 struct net_device *dev = platform_get_drvdata(pldev);
2201 int idx = pldev->id; 2201 int idx = pldev->id;
2202 struct sbmac_softc *sc = netdev_priv(dev); 2202 struct sbmac_softc *sc = netdev_priv(dev);
2203 unsigned char *eaddr; 2203 unsigned char *eaddr;
@@ -2275,7 +2275,7 @@ static int sbmac_init(struct platform_device *pldev, long long base)
2275 dev->name); 2275 dev->name);
2276 goto free_mdio; 2276 goto free_mdio;
2277 } 2277 }
2278 dev_set_drvdata(&pldev->dev, sc->mii_bus); 2278 platform_set_drvdata(pldev, sc->mii_bus);
2279 2279
2280 err = register_netdev(dev); 2280 err = register_netdev(dev);
2281 if (err) { 2281 if (err) {
@@ -2300,7 +2300,6 @@ static int sbmac_init(struct platform_device *pldev, long long base)
2300 return 0; 2300 return 0;
2301unreg_mdio: 2301unreg_mdio:
2302 mdiobus_unregister(sc->mii_bus); 2302 mdiobus_unregister(sc->mii_bus);
2303 dev_set_drvdata(&pldev->dev, NULL);
2304free_mdio: 2303free_mdio:
2305 mdiobus_free(sc->mii_bus); 2304 mdiobus_free(sc->mii_bus);
2306uninit_ctx: 2305uninit_ctx:
@@ -2624,7 +2623,7 @@ static int sbmac_probe(struct platform_device *pldev)
2624 goto out_unmap; 2623 goto out_unmap;
2625 } 2624 }
2626 2625
2627 dev_set_drvdata(&pldev->dev, dev); 2626 platform_set_drvdata(pldev, dev);
2628 SET_NETDEV_DEV(dev, &pldev->dev); 2627 SET_NETDEV_DEV(dev, &pldev->dev);
2629 2628
2630 sc = netdev_priv(dev); 2629 sc = netdev_priv(dev);
@@ -2649,7 +2648,7 @@ out_out:
2649 2648
2650static int __exit sbmac_remove(struct platform_device *pldev) 2649static int __exit sbmac_remove(struct platform_device *pldev)
2651{ 2650{
2652 struct net_device *dev = dev_get_drvdata(&pldev->dev); 2651 struct net_device *dev = platform_get_drvdata(pldev);
2653 struct sbmac_softc *sc = netdev_priv(dev); 2652 struct sbmac_softc *sc = netdev_priv(dev);
2654 2653
2655 unregister_netdev(dev); 2654 unregister_netdev(dev);