]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: move port_setup/teardown to be called outside devlink port registered area
authorJiri Pirko <jiri@nvidia.com>
Thu, 29 Sep 2022 07:28:59 +0000 (09:28 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 1 Oct 2022 01:17:16 +0000 (18:17 -0700)
commit47b96d07366f9b7c64c5fef00e1c9f3588981677
treec8d7a5f8dcd7f531c44f57ca35106862399694af
parent4886dd70d499ae08ae93cc1820b020c4b1887a80
net: dsa: move port_setup/teardown to be called outside devlink port registered area

Move port_setup() op to be called before devlink_port_register() and
port_teardown() after devlink_port_unregister().

Note it makes sense to move this alongside the rest of the devlink port
code, the reinit() function also gets much nicer, as clearly the fact that
port_setup()->devlink_port_region_create() was called in dsa_port_setup
did not fit the flow.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/dsa/dsa2.c