mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-25 00:52:45 -04:00
Merge series "regulator: devres: remove unused device-managed unregister APIs" from Alexandru Ardelean <aardelean@deviqon.com>:
These APIs aren't used anywhere and most-likely exist 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 these discourages any weird logic that could be created with
such an API functions.
Alexandru Ardelean (4):
regulator: devres: remove devm_regulator_unregister_notifier()
function
regulator: devres: remove devm_regulator_unregister() function
regulator: devres: remove
devm_regulator_bulk_unregister_supply_alias()
regulator: devres: unexport devm_regulator_unregister_supply_alias()
drivers/regulator/devres.c | 105 +----------------------------
include/linux/regulator/consumer.h | 23 -------
include/linux/regulator/driver.h | 1 -
3 files changed, 2 insertions(+), 127 deletions(-)
--
2.31.1
This commit is contained in:
@@ -222,17 +222,12 @@ void regulator_bulk_unregister_supply_alias(struct device *dev,
|
||||
int devm_regulator_register_supply_alias(struct device *dev, const char *id,
|
||||
struct device *alias_dev,
|
||||
const char *alias_id);
|
||||
void devm_regulator_unregister_supply_alias(struct device *dev,
|
||||
const char *id);
|
||||
|
||||
int devm_regulator_bulk_register_supply_alias(struct device *dev,
|
||||
const char *const *id,
|
||||
struct device *alias_dev,
|
||||
const char *const *alias_id,
|
||||
int num_id);
|
||||
void devm_regulator_bulk_unregister_supply_alias(struct device *dev,
|
||||
const char *const *id,
|
||||
int num_id);
|
||||
|
||||
/* regulator output control and status */
|
||||
int __must_check regulator_enable(struct regulator *regulator);
|
||||
@@ -408,11 +403,6 @@ static inline int devm_regulator_register_supply_alias(struct device *dev,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void devm_regulator_unregister_supply_alias(struct device *dev,
|
||||
const char *id)
|
||||
{
|
||||
}
|
||||
|
||||
static inline int devm_regulator_bulk_register_supply_alias(struct device *dev,
|
||||
const char *const *id,
|
||||
struct device *alias_dev,
|
||||
@@ -422,11 +412,6 @@ static inline int devm_regulator_bulk_register_supply_alias(struct device *dev,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void devm_regulator_bulk_unregister_supply_alias(
|
||||
struct device *dev, const char *const *id, int num_id)
|
||||
{
|
||||
}
|
||||
|
||||
static inline int regulator_enable(struct regulator *regulator)
|
||||
{
|
||||
return 0;
|
||||
|
||||
@@ -645,7 +645,6 @@ devm_regulator_register(struct device *dev,
|
||||
const struct regulator_desc *regulator_desc,
|
||||
const struct regulator_config *config);
|
||||
void regulator_unregister(struct regulator_dev *rdev);
|
||||
void devm_regulator_unregister(struct device *dev, struct regulator_dev *rdev);
|
||||
|
||||
int regulator_notifier_call_chain(struct regulator_dev *rdev,
|
||||
unsigned long event, void *data);
|
||||
|
||||
Reference in New Issue
Block a user