diff options
author | Geliang Tang <geliangtang@163.com> | 2015-12-22 16:11:49 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-12-22 21:04:09 +0100 |
commit | 5c29482dd17835def5cb97918f8f83a881c9918a (patch) | |
tree | 2f855653dab44427e11f609b5f88b995abb03e27 /net/core | |
parent | Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsh... (diff) | |
download | linux-5c29482dd17835def5cb97918f8f83a881c9918a.tar.xz linux-5c29482dd17835def5cb97918f8f83a881c9918a.zip |
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>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/net-sysfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index bca8c350e7f3..b6c8a6629b39 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c @@ -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); } |