Skip to content

Commit a6a71f1

Browse files
viviendavem330
authored andcommitted
net: dsa: isolate legacy code
This patch moves as is the legacy DSA code from dsa.c to legacy.c, except the few shared symbols which remain in dsa.c. Signed-off-by: Vivien Didelot <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 6b6cbc1 commit a6a71f1

File tree

5 files changed

+828
-768
lines changed

5 files changed

+828
-768
lines changed

include/net/dsa.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ struct dsa_notifier_bridge_info {
302302

303303
struct dsa_switch_ops {
304304
/*
305-
* Probing and setup.
305+
* Legacy probing.
306306
*/
307307
const char *(*probe)(struct device *dsa_dev,
308308
struct device *host_dev, int sw_addr,
@@ -472,9 +472,11 @@ struct dsa_switch_driver {
472472
const struct dsa_switch_ops *ops;
473473
};
474474

475+
/* Legacy driver registration */
475476
void register_switch_driver(struct dsa_switch_driver *type);
476477
void unregister_switch_driver(struct dsa_switch_driver *type);
477478
struct mii_bus *dsa_host_dev_to_mii_bus(struct device *dev);
479+
478480
struct net_device *dsa_dev_to_net_device(struct device *dev);
479481

480482
static inline bool dsa_uses_tagged_protocol(struct dsa_switch_tree *dst)

net/dsa/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# the core
22
obj-$(CONFIG_NET_DSA) += dsa_core.o
3-
dsa_core-y += dsa.o slave.o dsa2.o switch.o
3+
dsa_core-y += dsa.o slave.o dsa2.o switch.o legacy.o
44

55
# tagging formats
66
dsa_core-$(CONFIG_NET_DSA_TAG_BRCM) += tag_brcm.o

0 commit comments

Comments
 (0)