aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/depca.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2009-04-30 08:19:31 -0400
committerDavid S. Miller <davem@davemloft.net>2009-05-01 18:21:55 -0400
commit1aec5bdfed91b50aedbcad43393bcb05033c7ef3 (patch)
tree258db4a51298bc18f859170e8d611a8e3b406b0f /drivers/net/depca.c
parentaba7453037c3a90714caae77a622dceaf1173786 (diff)
net: remove driver_data direct access of struct device
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. Cc: netdev@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/depca.c')
-rw-r--r--drivers/net/depca.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/depca.c b/drivers/net/depca.c
index 357f565851ed..9301eb28d9e2 100644
--- a/drivers/net/depca.c
+++ b/drivers/net/depca.c
@@ -810,7 +810,7 @@ static int __init depca_hw_init (struct net_device *dev, struct device *device)
810 810
811 dev->mem_start = 0; 811 dev->mem_start = 0;
812 812
813 device->driver_data = dev; 813 dev_set_drvdata(device, dev);
814 SET_NETDEV_DEV (dev, device); 814 SET_NETDEV_DEV (dev, device);
815 815
816 status = register_netdev(dev); 816 status = register_netdev(dev);
@@ -1614,7 +1614,7 @@ static int __devexit depca_device_remove (struct device *device)
1614 struct depca_private *lp; 1614 struct depca_private *lp;
1615 int bus; 1615 int bus;
1616 1616
1617 dev = device->driver_data; 1617 dev = dev_get_drvdata(device);
1618 lp = netdev_priv(dev); 1618 lp = netdev_priv(dev);
1619 1619
1620 unregister_netdev (dev); 1620 unregister_netdev (dev);