regulator: devres: Remove unused devm_regulator_bulk_register_supply_alias
Subsystems (3)
PATCH 1/1 regulator: devres: Remove unused devm_regulator_bulk_register_supply_alias
From: "Dr. David Alan Gilbert" <[email protected]>
devm_regulator_bulk_register_supply_alias() has been unused since 2014's commit d137be00ee01 ("mfd: core: Don't use devres functions before device is added")
Remove it, and the static helpers only it used.
--- .../driver-api/driver-model/devres.rst | 1 - drivers/regulator/devres.c | 74 ------------------- include/linux/regulator/consumer.h | 6 -- 3 files changed, 81 deletions(-)
Documentation/driver-api/driver-model/devres.rst +0 -1
@@ -426,7 +426,6 @@ PWM devm_fwnode_pwm_get() REGULATOR - devm_regulator_bulk_register_supply_alias() devm_regulator_bulk_get() devm_regulator_bulk_get_const() devm_regulator_bulk_get_enable()
drivers/regulator/devres.c +0 -74
86 lines not on this page · raw message
include/linux/regulator/consumer.h +0 -6
@@ -185,12 +185,6 @@ int devm_regulator_register_supply_alias(struct device *dev, const char *id,struct device *alias_dev, const char *alias_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); -/* regulator output control and status */ int __must_check regulator_enable (struct regulator *regulator);int regulator_disable (struct regulator *regulator);
Signature · 1 line
2.47.0
Quoted 9 lines · * [email protected] ([email protected]) wrote:
From: "Dr. David Alan Gilbert" <[email protected]>
devm_regulator_bulk_register_supply_alias()has been unused since 2014's commitd137be00ee01("mfd: core: Don't use devres functions before device is added")Remove it, and the static helpers only it used.
Signed-off-by Dr. David Alan Gilbert <[email protected]>
Ping.
Thanks,
Dave
Quoted 130 lines
--- .../driver-api/driver-model/devres.rst | 1 - drivers/regulator/devres.c | 74 ------------------- include/linux/regulator/consumer.h | 6 -- 3 files changed, 81 deletions(-)Documentation/driver-api/driver-model/devres.rst +0
-1@@ -426,7 +426,6 @@ PWM devm_fwnode_pwm_get() REGULATOR - devm_regulator_bulk_register_supply_alias() devm_regulator_bulk_get() devm_regulator_bulk_get_const() devm_regulator_bulk_get_enable()drivers/regulator/devres.c +0
-74@@ -491,15 +491,6 @@ struct regulator_supply_alias_match {const char *id; }; -static int devm_regulator_match_supply_alias (struct device *dev,void *res, -void *data) -{ -struct regulator_supply_alias_match *match = res; -struct regulator_supply_alias_match *target = data; - -return match->dev == target->dev &&strcmp (match->id, target->id) ==0 ; -} -static void devm_regulator_destroy_supply_alias (struct device *dev,void *res) {struct regulator_supply_alias_match *match = res;@@ -548,71 +539,6 @@ int devm_regulator_register_supply_alias(struct device *dev, const char *id, }EXPORT_SYMBOL_GPL (devm_regulator_register_supply_alias); -static void devm_regulator_unregister_supply_alias (struct device *dev, -const char *id) -{ -struct regulator_supply_alias_match match; -int rc; - - match.dev = dev; - match.id = id; - - rc =devres_release (dev, devm_regulator_destroy_supply_alias, - devm_regulator_match_supply_alias, &match); -if (rc !=0 ) -WARN_ON (rc); -} - -/** -* devm_regulator_bulk_register_supply_alias - Managed register -* multiple aliases -* -* @dev: device to supply -* @id: list of supply names or regulator IDs -* @alias_dev: device that should be used to lookup the supply -* @alias_id: list of supply names or regulator IDs that should be used to -* lookup the supply -* @num_id: number of aliases to register -* -* @return 0 on success, a negative error number on failure. -* -* This helper function allows drivers to register several supply -* aliases in one operation, the aliases will be automatically -* unregisters when the source device is unbound. If any of the -* aliases cannot be registered any aliases that were registered -* will be removed before returning to the caller. -*/ -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) -{ -int i; -int ret; - -for (i =0 ; i < num_id; ++i) { - ret =devm_regulator_register_supply_alias (dev, id[i], - alias_dev, - alias_id[i]); -if (ret <0 ) - goto err; - } - -return 0 ; - -err: -dev_err (dev, -"Failed to create supply alias %s,%s -> %s,%s\n" , - id[i],dev_name (dev), alias_id[i],dev_name (alias_dev)); - -while (--i >=0 ) -devm_regulator_unregister_supply_alias (dev, id[i]); - -return ret; -} -EXPORT_SYMBOL_GPL (devm_regulator_bulk_register_supply_alias); -struct regulator_notifier_match {struct regulator *regulator;struct notifier_block *nb;include/linux/regulator/consumer.h +0
-6@@ -185,12 +185,6 @@ int devm_regulator_register_supply_alias(struct device *dev, const char *id,struct device *alias_dev, const char *alias_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); -/* regulator output control and status */ int __must_check regulator_enable (struct regulator *regulator);int regulator_disable (struct regulator *regulator);Signature · 1 line
2.47.0
Signature · 4 lines
-----Open up your eyes, open up your mind, open up your code ------- / Dr. David Alan Gilbert | Running GNU/Linux | Happy \ \ dave @ treblig.org | | In Hex / \ _________________________|_____ http://www.treblig.org |_______/
Mark Brown
maintainerQuoted 7 lines · Dr. David Alan Gilbert
Quoted 6 lines · * [email protected] ([email protected]) wrote:
From: "Dr. David Alan Gilbert" <[email protected]>
devm_regulator_bulk_register_supply_alias()has been unused since 2014's commitd137be00ee01("mfd: core: Don't use devres functions before device is added")
Quoted 5 lines
Quoted 3 lines
Remove it, and the static helpers only it used.
Signed-off-by Dr. David Alan Gilbert <[email protected]>Ping.
Please don't send content free pings and please allow a reasonable time for review. People get busy, go on holiday, attend conferences and so on so unless there is some reason for urgency (like critical bug fixes) please allow at least a couple of weeks for review. If there have been review comments then people may be waiting for those to be addressed.
Sending content free pings adds to the mail volume (if they are seen at all) which is often the problem and since they can't be reviewed directly if something has gone wrong you'll have to resend the patches anyway, so sending again is generally a better approach though there are some other maintainers who like them - if in doubt look at how patches for the subsystem are normally handled.