diff options
author | Jiri Pirko <jiri@mellanox.com> | 2019-10-03 11:49:31 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-10-04 11:10:56 -0700 |
commit | 471f894f106573b0b086d1003ee6172253c67b59 (patch) | |
tree | 0922c88f1a3e67687e73a97d1890266584b41d98 /net/core | |
parent | b7a595577ef3dc9add2b3e6d00869d017306bfbe (diff) | |
download | linux-stable-471f894f106573b0b086d1003ee6172253c67b59.tar.gz linux-stable-471f894f106573b0b086d1003ee6172253c67b59.tar.bz2 linux-stable-471f894f106573b0b086d1003ee6172253c67b59.zip |
net: devlink: export devlink net getter
Allow drivers to get net struct for devlink instance.
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/devlink.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/devlink.c b/net/core/devlink.c index e48680efe54a..362cbbcca225 100644 --- a/net/core/devlink.c +++ b/net/core/devlink.c @@ -95,10 +95,11 @@ static LIST_HEAD(devlink_list); */ static DEFINE_MUTEX(devlink_mutex); -static struct net *devlink_net(const struct devlink *devlink) +struct net *devlink_net(const struct devlink *devlink) { return read_pnet(&devlink->_net); } +EXPORT_SYMBOL_GPL(devlink_net); static void devlink_net_set(struct devlink *devlink, struct net *net) { |