]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: phy: dp83640: improve phydev and driver removal handling
authorHeiner Kallweit <hkallweit1@gmail.com>
Sat, 20 Sep 2025 21:33:16 +0000 (23:33 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 23 Sep 2025 23:58:42 +0000 (16:58 -0700)
commit42e2a9e11a1dcb81c83d50d18c547dc9a1c6d6ed
tree16843f8dd3a34b472584e47bc0e187e05e445770
parent7e554f317be8e41ce2f2ce9f6faca14e697b0d26
net: phy: dp83640: improve phydev and driver removal handling

Once the last user of a clock has been removed, the clock should be
removed. So far orphaned clocks are cleaned up in dp83640_free_clocks()
only. Add the logic to remove orphaned clocks in dp83640_remove().
This allows to simplify the code, and use standard macro
module_phy_driver(). dp83640 was the last external user of
phy_driver_register(), so we can stop exporting this function afterwards.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/6d4e80e7-c684-4d95-abbd-ea62b79a9a8a@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/dp83640.c