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
@@ -104,7 +104,7 @@ static int __init ne3210_eisa_probe (struct device *device)
|
||||
}
|
||||
|
||||
SET_NETDEV_DEV(dev, device);
|
||||
device->driver_data = dev;
|
||||
dev_set_drvdata(device, dev);
|
||||
ioaddr = edev->base_addr;
|
||||
|
||||
if (!request_region(ioaddr, NE3210_IO_EXTENT, DRV_NAME)) {
|
||||
@@ -225,7 +225,7 @@ static int __init ne3210_eisa_probe (struct device *device)
|
||||
|
||||
static int __devexit ne3210_eisa_remove (struct device *device)
|
||||
{
|
||||
struct net_device *dev = device->driver_data;
|
||||
struct net_device *dev = dev_get_drvdata(device);
|
||||
unsigned long ioaddr = to_eisa_device (device)->base_addr;
|
||||
|
||||
unregister_netdev (dev);
|
||||
|
||||
Reference in New Issue
Block a user