]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
net: ethernet: adi: adin1110: Fix notifiers
authorAlexandru Tachici <alexandru.tachici@analog.com>
Thu, 27 Oct 2022 09:56:55 +0000 (12:56 +0300)
committerJakub Kicinski <kuba@kernel.org>
Sat, 29 Oct 2022 04:54:21 +0000 (21:54 -0700)
commit21ce2c121fa07b00b0906bd781590ea362e82ea2
treeb46fb49dcbf5a7e7ec47cc3ece4bc5eae3412e74
parent9201f60a1983c049319eff89081453ad32571a39
net: ethernet: adi: adin1110: Fix notifiers

ADIN1110 was registering netdev_notifiers on each device probe.
This leads to warnings/probe failures because of double registration
of the same notifier when to adin1110/2111 devices are connected to
the same system.

Move the registration of netdev_notifiers in module init call,
in this way multiple driver instances can use the same notifiers.

Fixes: bc93e19d088b ("net: ethernet: adi: Add ADIN1110 support")
Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com>
Link: https://lore.kernel.org/r/20221027095655.89890-2-alexandru.tachici@analog.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/adi/adin1110.c