summaryrefslogtreecommitdiff
path: root/net/dsa/devlink.h
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2022-11-21 15:55:41 +0200
committerJakub Kicinski <kuba@kernel.org>2022-11-22 20:41:46 -0800
commit5cf2c75b5b91bcf81d61b2d2ea1c71363bcacf89 (patch)
tree1bafe3106befdca7f83071c94d45928c29c26509 /net/dsa/devlink.h
parentd2be320495b93ffb469e53100ba1668d0cd7eedc (diff)
net: dsa: move bulk of devlink code to devlink.{c,h}
dsa.c and dsa2.c are bloated with too much off-topic code. Identify all code related to devlink and move it to a new devlink.c file. Steer clear of the dsa_priv.h dumping ground antipattern and create a dedicated devlink.h for it, which will be included only by the C files which need it. Usage of dsa_priv.h will be minimized in later patches. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/dsa/devlink.h')
-rw-r--r--net/dsa/devlink.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/net/dsa/devlink.h b/net/dsa/devlink.h
new file mode 100644
index 000000000000..d077c7f336da
--- /dev/null
+++ b/net/dsa/devlink.h
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#ifndef __DSA_DEVLINK_H
+#define __DSA_DEVLINK_H
+
+struct dsa_port;
+
+extern const struct devlink_ops dsa_devlink_ops;
+
+int dsa_port_devlink_setup(struct dsa_port *dp);
+void dsa_port_devlink_teardown(struct dsa_port *dp);
+
+#endif