OSDN Git Service
(root)
/
android-x86
/
kernel.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
|
history
diff --git
a/net/core/net-sysfs.c
b/net/core/net-sysfs.c
index
bca8c35
..
b6c8a66
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);
}