projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d317aa5
)
net-sysfs: use to_net_dev in net_namespace()
author
Geliang Tang
<geliangtang@163.com>
Tue, 22 Dec 2015 15:11:49 +0000
(23:11 +0800)
committer
David S. Miller
<davem@davemloft.net>
Tue, 22 Dec 2015 20:04:09 +0000
(15:04 -0500)
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>
net/core/net-sysfs.c
patch
|
blob
|
blame
|
history
diff --git
a/net/core/net-sysfs.c
b/net/core/net-sysfs.c
index bca8c350e7f30e44ea4743adcd606234aa44627c..b6c8a6629b397134f5ea539adb7ef8ba80625225 100644
(file)
--- 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);
}