summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2019-10-03 11:49:31 +0200
committerDavid S. Miller <davem@davemloft.net>2019-10-04 11:10:56 -0700
commit471f894f106573b0b086d1003ee6172253c67b59 (patch)
tree0922c88f1a3e67687e73a97d1890266584b41d98 /net
parentb7a595577ef3dc9add2b3e6d00869d017306bfbe (diff)
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')
-rw-r--r--net/core/devlink.c3
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)
{