From: "Dr. David Alan Gilbert" <linux@xxxxxxxxxxx> regulator_bulk_force_disable() was explicitly added in 2012 by commit e1de2f423462 ("regulator: add regulator_bulk_force_disable function") but hasn't been used. Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@xxxxxxxxxxx> --- drivers/regulator/core.c | 34 ------------------------------ include/linux/regulator/consumer.h | 8 ------- 2 files changed, 42 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 90629a756693..32e3919e37d2 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -5196,40 +5196,6 @@ int regulator_bulk_disable(int num_consumers, } EXPORT_SYMBOL_GPL(regulator_bulk_disable); -/** - * regulator_bulk_force_disable - force disable multiple regulator consumers - * - * @num_consumers: Number of consumers - * @consumers: Consumer data; clients are stored here. - * - * This convenience API allows consumers to forcibly disable multiple regulator - * clients in a single API call. - * NOTE: This should be used for situations when device damage will - * likely occur if the regulators are not disabled (e.g. over temp). - * Although regulator_force_disable function call for some consumers can - * return error numbers, the function is called for all consumers. - * - * Return: 0 on success or a negative error number on failure. - */ -int regulator_bulk_force_disable(int num_consumers, - struct regulator_bulk_data *consumers) -{ - int i; - int ret = 0; - - for (i = 0; i < num_consumers; i++) { - consumers[i].ret = - regulator_force_disable(consumers[i].consumer); - - /* Store first error for reporting */ - if (consumers[i].ret && !ret) - ret = consumers[i].ret; - } - - return ret; -} -EXPORT_SYMBOL_GPL(regulator_bulk_force_disable); - /** * regulator_bulk_free - free multiple regulator consumers * diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index 1e20c7330cd4..999eba865c20 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h @@ -209,8 +209,6 @@ int devm_regulator_bulk_get_enable(struct device *dev, int num_consumers, const char * const *id); int regulator_bulk_disable(int num_consumers, struct regulator_bulk_data *consumers); -int regulator_bulk_force_disable(int num_consumers, - struct regulator_bulk_data *consumers); void regulator_bulk_free(int num_consumers, struct regulator_bulk_data *consumers); @@ -470,12 +468,6 @@ static inline int regulator_bulk_disable(int num_consumers, return 0; } -static inline int regulator_bulk_force_disable(int num_consumers, - struct regulator_bulk_data *consumers) -{ - return 0; -} - static inline void regulator_bulk_free(int num_consumers, struct regulator_bulk_data *consumers) { -- 2.49.0