diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2017-12-07 02:03:33 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-12-07 22:14:54 +0300 |
commit | 2a93c1a3651fb41b580676c849887b68af6da02b (patch) | |
tree | 15a29c4aa5f0688f75b335e611b1dfd18ee3bb95 /net/dsa/dsa_priv.h | |
parent | a8168b6cee6e9334dfebb4b9108e8d73794f6088 (diff) | |
download | linux-2a93c1a3651fb41b580676c849887b68af6da02b.tar.xz |
net: dsa: Allow compiling out legacy support
Introduce a configuration option: CONFIG_NET_DSA_LEGACY allowing to compile out
support for the old platform device and Device Tree binding registration.
Support for these configurations is scheduled to be removed in 4.17.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/dsa_priv.h')
-rw-r--r-- | net/dsa/dsa_priv.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h index 7d036696e8c4..b03665e8fb4e 100644 --- a/net/dsa/dsa_priv.h +++ b/net/dsa/dsa_priv.h @@ -97,8 +97,17 @@ const struct dsa_device_ops *dsa_resolve_tag_protocol(int tag_protocol); bool dsa_schedule_work(struct work_struct *work); /* 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 -ENODEV; +} + +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, |