diff options
author | Jiri Pirko <jiri@nvidia.com> | 2023-09-13 09:12:32 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-09-17 14:01:46 +0100 |
commit | d0b7e990f760ec9a614fbe5f89a5cede4335a7bb (patch) | |
tree | 79be0d5641cfc5e51444414afc0aeb388691505e /net/devlink/devl_internal.h | |
parent | 1e73cfe859523236e6e29167673fc2885f1b99c4 (diff) |
devlink: move linecard struct into linecard.c
Instead of exposing linecard struct, expose a simple helper to get the
linecard index, which is all is needed outside linecard.c. Move the
linecard struct to linecard.c and keep it private similar to the rest of
the devlink objects.
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/devlink/devl_internal.h')
-rw-r--r-- | net/devlink/devl_internal.h | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/net/devlink/devl_internal.h b/net/devlink/devl_internal.h index f6b5fea2e13c..1b05c2c09e27 100644 --- a/net/devlink/devl_internal.h +++ b/net/devlink/devl_internal.h @@ -206,19 +206,7 @@ int devlink_rate_nodes_check(struct devlink *devlink, u16 mode, struct netlink_ext_ack *extack); /* Linecards */ -struct devlink_linecard { - struct list_head list; - struct devlink *devlink; - unsigned int index; - const struct devlink_linecard_ops *ops; - void *priv; - enum devlink_linecard_state state; - struct mutex state_lock; /* Protects state */ - const char *type; - struct devlink_linecard_type *types; - unsigned int types_count; - struct devlink *nested_devlink; -}; +unsigned int devlink_linecard_index(struct devlink_linecard *linecard); /* Devlink nl cmds */ int devlink_nl_cmd_reload(struct sk_buff *skb, struct genl_info *info); |