Skip to content

Commit 93e86b3

Browse files
lunndavem330
authored andcommitted
net: dsa: Remove legacy probing support
Now that all drivers can be probed using more traditional methods, remove the legacy probe code. Signed-off-by: Andrew Lunn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 2f8e7ec commit 93e86b3

File tree

6 files changed

+0
-797
lines changed

6 files changed

+0
-797
lines changed

include/net/dsa.h

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -318,15 +318,6 @@ static inline bool dsa_port_is_vlan_filtering(const struct dsa_port *dp)
318318
typedef int dsa_fdb_dump_cb_t(const unsigned char *addr, u16 vid,
319319
bool is_static, void *data);
320320
struct dsa_switch_ops {
321-
#if IS_ENABLED(CONFIG_NET_DSA_LEGACY)
322-
/*
323-
* Legacy probing.
324-
*/
325-
const char *(*probe)(struct device *dsa_dev,
326-
struct device *host_dev, int sw_addr,
327-
void **priv);
328-
#endif
329-
330321
enum dsa_tag_protocol (*get_tag_protocol)(struct dsa_switch *ds,
331322
int port);
332323

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

519-
#if IS_ENABLED(CONFIG_NET_DSA_LEGACY)
520-
/* Legacy driver registration */
521-
void register_switch_driver(struct dsa_switch_driver *type);
522-
void unregister_switch_driver(struct dsa_switch_driver *type);
523-
struct mii_bus *dsa_host_dev_to_mii_bus(struct device *dev);
524-
525-
#else
526-
static inline void register_switch_driver(struct dsa_switch_driver *type) { }
527-
static inline void unregister_switch_driver(struct dsa_switch_driver *type) { }
528-
static inline struct mii_bus *dsa_host_dev_to_mii_bus(struct device *dev)
529-
{
530-
return NULL;
531-
}
532-
#endif
533510
struct net_device *dsa_dev_to_net_device(struct device *dev);
534511

535512
/* Keep inline for faster access in hot path */

net/dsa/Kconfig

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,6 @@ menuconfig NET_DSA
1717

1818
if NET_DSA
1919

20-
config NET_DSA_LEGACY
21-
bool "Support for older platform device and Device Tree registration"
22-
default y
23-
---help---
24-
Say Y if you want to enable support for the older platform device and
25-
deprecated Device Tree binding registration.
26-
27-
This feature is scheduled for removal in 4.17.
28-
2920
config NET_DSA_TAG_BRCM_COMMON
3021
tristate
3122
default n

net/dsa/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# the core
33
obj-$(CONFIG_NET_DSA) += dsa_core.o
44
dsa_core-y += dsa.o dsa2.o master.o port.o slave.o switch.o
5-
dsa_core-$(CONFIG_NET_DSA_LEGACY) += legacy.o
65

76
# tagging formats
87
obj-$(CONFIG_NET_DSA_TAG_BRCM_COMMON) += tag_brcm.o

net/dsa/dsa.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -346,10 +346,6 @@ static int __init dsa_init_module(void)
346346
if (rc)
347347
return rc;
348348

349-
rc = dsa_legacy_register();
350-
if (rc)
351-
return rc;
352-
353349
dev_add_pack(&dsa_pack_type);
354350

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

366362
dsa_slave_unregister_notifier();
367363
dev_remove_pack(&dsa_pack_type);
368-
dsa_legacy_unregister();
369364
destroy_workqueue(dsa_owq);
370365
}
371366
module_exit(dsa_cleanup_module);

net/dsa/dsa_priv.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -90,18 +90,6 @@ void dsa_tag_driver_put(const struct dsa_device_ops *ops);
9090
bool dsa_schedule_work(struct work_struct *work);
9191
const char *dsa_tag_protocol_to_str(const struct dsa_device_ops *ops);
9292

93-
/* legacy.c */
94-
#if IS_ENABLED(CONFIG_NET_DSA_LEGACY)
95-
int dsa_legacy_register(void);
96-
void dsa_legacy_unregister(void);
97-
#else
98-
static inline int dsa_legacy_register(void)
99-
{
100-
return 0;
101-
}
102-
103-
static inline void dsa_legacy_unregister(void) { }
104-
#endif
10593
int dsa_legacy_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
10694
struct net_device *dev,
10795
const unsigned char *addr, u16 vid,

0 commit comments

Comments
 (0)