You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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>
This commit is contained in:
committed by
David S. Miller
parent
aba7453037
commit
1aec5bdfed
+2
-2
@@ -2864,7 +2864,7 @@ static int __init hp100_eisa_probe (struct device *gendev)
|
||||
printk("hp100: %s: EISA adapter found at 0x%x\n", dev->name,
|
||||
dev->base_addr);
|
||||
#endif
|
||||
gendev->driver_data = dev;
|
||||
dev_set_drvdata(gendev, dev);
|
||||
return 0;
|
||||
out1:
|
||||
free_netdev(dev);
|
||||
@@ -2873,7 +2873,7 @@ static int __init hp100_eisa_probe (struct device *gendev)
|
||||
|
||||
static int __devexit hp100_eisa_remove (struct device *gendev)
|
||||
{
|
||||
struct net_device *dev = gendev->driver_data;
|
||||
struct net_device *dev = dev_get_drvdata(gendev);
|
||||
cleanup_dev(dev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user