提交 5c29482d 编写于 作者: G Geliang Tang 提交者: David S. Miller

net-sysfs: use to_net_dev in net_namespace()

Use to_net_dev() instead of open-coding it.
Signed-off-by: NGeliang Tang <geliangtang@163.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d317aa58
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册