mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
net-sysfs: use to_net_dev in net_namespace()
Use to_net_dev() instead of open-coding it. Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
d317aa5893
commit
5c29482dd1
@ -1453,8 +1453,8 @@ static void netdev_release(struct device *d)
|
||||
|
||||
static const void *net_namespace(struct device *d)
|
||||
{
|
||||
struct net_device *dev;
|
||||
dev = container_of(d, struct net_device, dev);
|
||||
struct net_device *dev = to_net_dev(d);
|
||||
|
||||
return dev_net(dev);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user