Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5c29482d authored by Geliang Tang's avatar Geliang Tang Committed by David S. Miller
Browse files

net-sysfs: use to_net_dev in net_namespace()



Use to_net_dev() instead of open-coding it.

Signed-off-by: default avatarGeliang Tang <geliangtang@163.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d317aa58
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);
}