]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: devres: remove devm_regulator_unregister() function
authorAlexandru Ardelean <aardelean@deviqon.com>
Fri, 25 Jun 2021 12:23:22 +0000 (15:23 +0300)
committerMark Brown <broonie@kernel.org>
Sun, 11 Jul 2021 22:50:32 +0000 (23:50 +0100)
commit0b9a050a1d34d56ffc4a70ffcaada83de4c8eef1
tree5a93dedd4bfde3a100facbb7ba7d73e6dddd6053
parent035eb044d568913a7c7bdf091cc2c70e636bd060
regulator: devres: remove devm_regulator_unregister() function

This API hook isn't used anywhere and most-likely exists because of the
general principle of C APIs, where if an API function does an
allocation/registration, it must also have an equivalent
deallocation/deregistration counterpart.

For devm_ functions this isn't all that true (for all cases), as the idea
of these function is to provide an auto-cleanup logic on drivers/system
de-init.

Removing this also discourages any weird logic that could be created with
such an API function.

Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com>
Link: https://lore.kernel.org/r/20210625122324.327585-3-aardelean@deviqon.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/devres.c
include/linux/regulator/driver.h