OSDN Git Service

staging: dpaa2-switch: move the notifier register to module_init()
authorIoana Ciornei <ioana.ciornei@nxp.com>
Wed, 10 Mar 2021 12:14:48 +0000 (14:14 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 10 Mar 2021 21:30:36 +0000 (13:30 -0800)
commit16abb6ad6abc5ffe45d1e03e9263530b263de2a1
tree4a6fa96787265f8a1e8186c3766905cc5c300a4f
parent539dda3c5d190c5088b5e57944b1b482fcb464de
staging: dpaa2-switch: move the notifier register to module_init()

Move the notifier blocks register into the module_init() step, instead of
object probe, so that all DPSW devices probed by the dpaa2-switch driver
can use the same notifiers.

This will enable us to have a more straightforward approach in
determining if an event is intended for an object managed by this driver
or not. Previously, the dpaa2_switch_port_dev_check() function was
forced to also check the notifier block beside the net_device_ops
structure to determine if the event is for us or not.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/staging/fsl-dpaa2/ethsw/ethsw.c
drivers/staging/fsl-dpaa2/ethsw/ethsw.h