Skip to content

Commit

Permalink
net: dsa: isolate legacy code
Browse files Browse the repository at this point in the history
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 <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Vivien Didelot authored and David S. Miller committed Apr 17, 2017
1 parent 6b6cbc1 commit a6a71f1
Show file tree
Hide file tree
Showing 5 changed files with 828 additions and 768 deletions.
4 changes: 3 additions & 1 deletion include/net/dsa.h
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ struct dsa_notifier_bridge_info {

struct dsa_switch_ops {
/*
* Probing and setup.
* Legacy probing.
*/
const char *(*probe)(struct device *dsa_dev,
struct device *host_dev, int sw_addr,
Expand Down Expand Up @@ -472,9 +472,11 @@ struct dsa_switch_driver {
const struct dsa_switch_ops *ops;
};

/* Legacy driver registration */
void register_switch_driver(struct dsa_switch_driver *type);
void unregister_switch_driver(struct dsa_switch_driver *type);
struct mii_bus *dsa_host_dev_to_mii_bus(struct device *dev);

struct net_device *dsa_dev_to_net_device(struct device *dev);

static inline bool dsa_uses_tagged_protocol(struct dsa_switch_tree *dst)
Expand Down
2 changes: 1 addition & 1 deletion net/dsa/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# the core
obj-$(CONFIG_NET_DSA) += dsa_core.o
dsa_core-y += dsa.o slave.o dsa2.o switch.o
dsa_core-y += dsa.o slave.o dsa2.o switch.o legacy.o

# tagging formats
dsa_core-$(CONFIG_NET_DSA_TAG_BRCM) += tag_brcm.o
Expand Down
Loading

0 comments on commit a6a71f1

Please sign in to comment.