mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-04 08:08:54 +00:00
dsa: Register the none tagger ops
The none tagger is special in that it does not live in a tag_*.c file, but is within the core. Register/unregister when DSA is loaded/unloaded. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
bdc6fe5bb1
commit
409065b069
1 changed files with 7 additions and 0 deletions
|
@ -44,6 +44,8 @@ static const struct dsa_device_ops none_ops = {
|
||||||
.rcv = NULL,
|
.rcv = NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
DSA_TAG_DRIVER(none_ops);
|
||||||
|
|
||||||
const struct dsa_device_ops *dsa_device_ops[DSA_TAG_LAST] = {
|
const struct dsa_device_ops *dsa_device_ops[DSA_TAG_LAST] = {
|
||||||
#ifdef CONFIG_NET_DSA_TAG_BRCM
|
#ifdef CONFIG_NET_DSA_TAG_BRCM
|
||||||
[DSA_TAG_PROTO_BRCM] = &brcm_netdev_ops,
|
[DSA_TAG_PROTO_BRCM] = &brcm_netdev_ops,
|
||||||
|
@ -352,12 +354,17 @@ static int __init dsa_init_module(void)
|
||||||
|
|
||||||
dev_add_pack(&dsa_pack_type);
|
dev_add_pack(&dsa_pack_type);
|
||||||
|
|
||||||
|
dsa_tag_driver_register(&DSA_TAG_DRIVER_NAME(none_ops),
|
||||||
|
THIS_MODULE);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
module_init(dsa_init_module);
|
module_init(dsa_init_module);
|
||||||
|
|
||||||
static void __exit dsa_cleanup_module(void)
|
static void __exit dsa_cleanup_module(void)
|
||||||
{
|
{
|
||||||
|
dsa_tag_driver_unregister(&DSA_TAG_DRIVER_NAME(none_ops));
|
||||||
|
|
||||||
dsa_slave_unregister_notifier();
|
dsa_slave_unregister_notifier();
|
||||||
dev_remove_pack(&dsa_pack_type);
|
dev_remove_pack(&dsa_pack_type);
|
||||||
dsa_legacy_unregister();
|
dsa_legacy_unregister();
|
||||||
|
|
Loading…
Reference in a new issue