diff options
author | 2023-12-20 01:52:29 -0300 | |
---|---|---|
committer | 2024-01-01 13:01:27 +0000 | |
commit | cff9c565e65f3622e8dc1dcc21c1520a083dff35 (patch) | |
tree | b8648d251495b295f902ebbdabf993f873565029 /net/core/dev.c | |
parent | Merge tag 'mlx5-updates-2023-12-20' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux (diff) | |
download | linux-rng-cff9c565e65f3622e8dc1dcc21c1520a083dff35.tar.xz linux-rng-cff9c565e65f3622e8dc1dcc21c1520a083dff35.zip |
net: mdio: get/put device node during (un)registration
The __of_mdiobus_register() function was storing the device node in
dev.of_node without increasing its reference count. It implicitly relied
on the caller to maintain the allocated node until the mdiobus was
unregistered.
Now, __of_mdiobus_register() will acquire the node before assigning it,
and of_mdiobus_unregister_callback() will be called at the end of
mdio_unregister().
Drivers can now release the node immediately after MDIO registration.
Some of them are already doing that even before this patch.
Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.c')
0 files changed, 0 insertions, 0 deletions