diff options
author | Geliang Tang <geliangtang@163.com> | 2015-12-22 23:11:49 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-12-22 15:04:09 -0500 |
commit | 5c29482dd17835def5cb97918f8f83a881c9918a (patch) | |
tree | 2f855653dab44427e11f609b5f88b995abb03e27 | |
parent | d317aa5893015d473c11a55bc3125ebd68648946 (diff) | |
download | op-kernel-dev-5c29482dd17835def5cb97918f8f83a881c9918a.zip op-kernel-dev-5c29482dd17835def5cb97918f8f83a881c9918a.tar.gz |
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>
-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 bca8c35..b6c8a66 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); } |