aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sb1250-mac.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2009-05-05 00:33:19 -0400
committerDavid S. Miller <davem@davemloft.net>2009-05-05 00:33:19 -0400
commitc7ae011dc8306d982c25fb4f679752e790a08dc4 (patch)
treef5ba5370f13272d1cfc43496b4f2b02352e15209 /drivers/net/sb1250-mac.c
parent088eb2d905de9518dad913995bb8aef493d4a7c5 (diff)
net: remove driver_data direct access of struct device from more drivers
In the near future, the driver core is going to not allow direct access to the driver_data pointer in struct device. Instead, the functions dev_get_drvdata() and dev_set_drvdata() should be used. These functions have been around since the beginning, so are backwards compatible with all older kernel versions. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sb1250-mac.c')
-rw-r--r--drivers/net/sb1250-mac.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/sb1250-mac.c b/drivers/net/sb1250-mac.c
index aaeebf57a9a4..7a4b9fbddbaf 100644
--- a/drivers/net/sb1250-mac.c
+++ b/drivers/net/sb1250-mac.c
@@ -2300,7 +2300,7 @@ static const struct net_device_ops sbmac_netdev_ops = {
2300 2300
2301static int sbmac_init(struct platform_device *pldev, long long base) 2301static int sbmac_init(struct platform_device *pldev, long long base)
2302{ 2302{
2303 struct net_device *dev = pldev->dev.driver_data; 2303 struct net_device *dev = dev_get_drvdata(&pldev->dev);
2304 int idx = pldev->id; 2304 int idx = pldev->id;
2305 struct sbmac_softc *sc = netdev_priv(dev); 2305 struct sbmac_softc *sc = netdev_priv(dev);
2306 unsigned char *eaddr; 2306 unsigned char *eaddr;
@@ -2731,7 +2731,7 @@ static int __init sbmac_probe(struct platform_device *pldev)
2731 goto out_unmap; 2731 goto out_unmap;
2732 } 2732 }
2733 2733
2734 pldev->dev.driver_data = dev; 2734 dev_set_drvdata(&pldev->dev, dev);
2735 SET_NETDEV_DEV(dev, &pldev->dev); 2735 SET_NETDEV_DEV(dev, &pldev->dev);
2736 2736
2737 sc = netdev_priv(dev); 2737 sc = netdev_priv(dev);
@@ -2756,7 +2756,7 @@ out_out:
2756 2756
2757static int __exit sbmac_remove(struct platform_device *pldev) 2757static int __exit sbmac_remove(struct platform_device *pldev)
2758{ 2758{
2759 struct net_device *dev = pldev->dev.driver_data; 2759 struct net_device *dev = dev_get_drvdata(&pldev->dev);
2760 struct sbmac_softc *sc = netdev_priv(dev); 2760 struct sbmac_softc *sc = netdev_priv(dev);
2761 2761
2762 unregister_netdev(dev); 2762 unregister_netdev(dev);