Skip to content

Commit

Permalink
net: dsa: Remove legacy probing support
Browse files Browse the repository at this point in the history
Now that all drivers can be probed using more traditional methods,
remove the legacy probe code.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Andrew Lunn authored and David S. Miller committed May 1, 2019
1 parent 2f8e7ec commit 93e86b3
Showing 6 changed files with 0 additions and 797 deletions.
23 changes: 0 additions & 23 deletions include/net/dsa.h
Original file line number Diff line number Diff line change
@@ -318,15 +318,6 @@ static inline bool dsa_port_is_vlan_filtering(const struct dsa_port *dp)
typedef int dsa_fdb_dump_cb_t(const unsigned char *addr, u16 vid,
bool is_static, void *data);
struct dsa_switch_ops {
#if IS_ENABLED(CONFIG_NET_DSA_LEGACY)
/*
* Legacy probing.
*/
const char *(*probe)(struct device *dsa_dev,
struct device *host_dev, int sw_addr,
void **priv);
#endif

enum dsa_tag_protocol (*get_tag_protocol)(struct dsa_switch *ds,
int port);

@@ -516,20 +507,6 @@ struct dsa_switch_driver {
const struct dsa_switch_ops *ops;
};

#if IS_ENABLED(CONFIG_NET_DSA_LEGACY)
/* 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);

#else
static inline void register_switch_driver(struct dsa_switch_driver *type) { }
static inline void unregister_switch_driver(struct dsa_switch_driver *type) { }
static inline struct mii_bus *dsa_host_dev_to_mii_bus(struct device *dev)
{
return NULL;
}
#endif
struct net_device *dsa_dev_to_net_device(struct device *dev);

/* Keep inline for faster access in hot path */
9 changes: 0 additions & 9 deletions net/dsa/Kconfig
Original file line number Diff line number Diff line change
@@ -17,15 +17,6 @@ menuconfig NET_DSA

if NET_DSA

config NET_DSA_LEGACY
bool "Support for older platform device and Device Tree registration"
default y
---help---
Say Y if you want to enable support for the older platform device and
deprecated Device Tree binding registration.

This feature is scheduled for removal in 4.17.

config NET_DSA_TAG_BRCM_COMMON
tristate
default n
1 change: 0 additions & 1 deletion net/dsa/Makefile
Original file line number Diff line number Diff line change
@@ -2,7 +2,6 @@
# the core
obj-$(CONFIG_NET_DSA) += dsa_core.o
dsa_core-y += dsa.o dsa2.o master.o port.o slave.o switch.o
dsa_core-$(CONFIG_NET_DSA_LEGACY) += legacy.o

# tagging formats
obj-$(CONFIG_NET_DSA_TAG_BRCM_COMMON) += tag_brcm.o
5 changes: 0 additions & 5 deletions net/dsa/dsa.c
Original file line number Diff line number Diff line change
@@ -346,10 +346,6 @@ static int __init dsa_init_module(void)
if (rc)
return rc;

rc = dsa_legacy_register();
if (rc)
return rc;

dev_add_pack(&dsa_pack_type);

dsa_tag_driver_register(&DSA_TAG_DRIVER_NAME(none_ops),
@@ -365,7 +361,6 @@ static void __exit dsa_cleanup_module(void)

dsa_slave_unregister_notifier();
dev_remove_pack(&dsa_pack_type);
dsa_legacy_unregister();
destroy_workqueue(dsa_owq);
}
module_exit(dsa_cleanup_module);
12 changes: 0 additions & 12 deletions net/dsa/dsa_priv.h
Original file line number Diff line number Diff line change
@@ -90,18 +90,6 @@ void dsa_tag_driver_put(const struct dsa_device_ops *ops);
bool dsa_schedule_work(struct work_struct *work);
const char *dsa_tag_protocol_to_str(const struct dsa_device_ops *ops);

/* legacy.c */
#if IS_ENABLED(CONFIG_NET_DSA_LEGACY)
int dsa_legacy_register(void);
void dsa_legacy_unregister(void);
#else
static inline int dsa_legacy_register(void)
{
return 0;
}

static inline void dsa_legacy_unregister(void) { }
#endif
int dsa_legacy_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
struct net_device *dev,
const unsigned char *addr, u16 vid,
Loading

0 comments on commit 93e86b3

Please sign in to comment.