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/hp100.c | |
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/hp100.c')
-rw-r--r-- | drivers/net/hp100.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/hp100.c b/drivers/net/hp100.c index de3f49f991a3..8feda9fe8297 100644 --- a/drivers/net/hp100.c +++ b/drivers/net/hp100.c | |||
@@ -2864,7 +2864,7 @@ static int __init hp100_eisa_probe (struct device *gendev) | |||
2864 | printk("hp100: %s: EISA adapter found at 0x%x\n", dev->name, | 2864 | printk("hp100: %s: EISA adapter found at 0x%x\n", dev->name, |
2865 | dev->base_addr); | 2865 | dev->base_addr); |
2866 | #endif | 2866 | #endif |
2867 | gendev->driver_data = dev; | 2867 | dev_set_drvdata(gendev, dev); |
2868 | return 0; | 2868 | return 0; |
2869 | out1: | 2869 | out1: |
2870 | free_netdev(dev); | 2870 | free_netdev(dev); |
@@ -2873,7 +2873,7 @@ static int __init hp100_eisa_probe (struct device *gendev) | |||
2873 | 2873 | ||
2874 | static int __devexit hp100_eisa_remove (struct device *gendev) | 2874 | static int __devexit hp100_eisa_remove (struct device *gendev) |
2875 | { | 2875 | { |
2876 | struct net_device *dev = gendev->driver_data; | 2876 | struct net_device *dev = dev_get_drvdata(gendev); |
2877 | cleanup_dev(dev); | 2877 | cleanup_dev(dev); |
2878 | return 0; | 2878 | return 0; |
2879 | } | 2879 | } |