diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-04-30 08:19:31 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-01 18:21:55 -0400 |
commit | 1aec5bdfed91b50aedbcad43393bcb05033c7ef3 (patch) | |
tree | 258db4a51298bc18f859170e8d611a8e3b406b0f /drivers/net/tulip | |
parent | aba7453037c3a90714caae77a622dceaf1173786 (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/tulip')
-rw-r--r-- | drivers/net/tulip/de4x5.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c index f9491bd787d1..32256179a205 100644 --- a/drivers/net/tulip/de4x5.c +++ b/drivers/net/tulip/de4x5.c | |||
@@ -1099,7 +1099,7 @@ de4x5_hw_init(struct net_device *dev, u_long iobase, struct device *gendev) | |||
1099 | struct pci_dev *pdev = NULL; | 1099 | struct pci_dev *pdev = NULL; |
1100 | int i, status=0; | 1100 | int i, status=0; |
1101 | 1101 | ||
1102 | gendev->driver_data = dev; | 1102 | dev_set_drvdata(gendev, dev); |
1103 | 1103 | ||
1104 | /* Ensure we're not sleeping */ | 1104 | /* Ensure we're not sleeping */ |
1105 | if (lp->bus == EISA) { | 1105 | if (lp->bus == EISA) { |
@@ -2094,7 +2094,7 @@ static int __devexit de4x5_eisa_remove (struct device *device) | |||
2094 | struct net_device *dev; | 2094 | struct net_device *dev; |
2095 | u_long iobase; | 2095 | u_long iobase; |
2096 | 2096 | ||
2097 | dev = device->driver_data; | 2097 | dev = dev_get_drvdata(device); |
2098 | iobase = dev->base_addr; | 2098 | iobase = dev->base_addr; |
2099 | 2099 | ||
2100 | unregister_netdev (dev); | 2100 | unregister_netdev (dev); |
@@ -2338,7 +2338,7 @@ static void __devexit de4x5_pci_remove (struct pci_dev *pdev) | |||
2338 | struct net_device *dev; | 2338 | struct net_device *dev; |
2339 | u_long iobase; | 2339 | u_long iobase; |
2340 | 2340 | ||
2341 | dev = pdev->dev.driver_data; | 2341 | dev = dev_get_drvdata(&pdev->dev); |
2342 | iobase = dev->base_addr; | 2342 | iobase = dev->base_addr; |
2343 | 2343 | ||
2344 | unregister_netdev (dev); | 2344 | unregister_netdev (dev); |