diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-04-30 12:19:31 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-01 22:21:55 (GMT) |
commit | 1aec5bdfed91b50aedbcad43393bcb05033c7ef3 (patch) | |
tree | 258db4a51298bc18f859170e8d611a8e3b406b0f /drivers/net/depca.c | |
parent | aba7453037c3a90714caae77a622dceaf1173786 (diff) | |
download | linux-1aec5bdfed91b50aedbcad43393bcb05033c7ef3.tar.xz |
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/depca.c b/drivers/net/depca.c index 357f565..9301eb2 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) dev->mem_start = 0; - device->driver_data = dev; + dev_set_drvdata(device, dev); SET_NETDEV_DEV (dev, device); status = register_netdev(dev); @@ -1614,7 +1614,7 @@ static int __devexit depca_device_remove (struct device *device) struct depca_private *lp; int bus; - dev = device->driver_data; + dev = dev_get_drvdata(device); lp = netdev_priv(dev); unregister_netdev (dev); |