Skip to content

Commit 602ff58

Browse files
jbrun3tbroonie
authored andcommitted
regulator: core: remove machine init callback from config
The machine specific regulator_init() appears to be unused. It does not allow a lot of interaction with the regulator framework, since nothing from the framework is passed along (desc, config, etc ...) Machine specific init may also be done with the added init_cb() in the regulator description, so remove regulator_init(). Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://patch.msgid.link/20241008-regulator-ignored-data-v2-3-d1251e0ee507@baylibre.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent cfcdf39 commit 602ff58

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

drivers/regulator/core.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5775,13 +5775,6 @@ regulator_register(struct device *dev,
57755775
resolved_early = true;
57765776
}
57775777

5778-
/* perform any regulator specific init */
5779-
if (init_data && init_data->regulator_init) {
5780-
ret = init_data->regulator_init(rdev->reg_data);
5781-
if (ret < 0)
5782-
goto wash;
5783-
}
5784-
57855778
if (config->ena_gpiod) {
57865779
ret = regulator_ena_gpio_request(rdev, config);
57875780
if (ret != 0) {

include/linux/regulator/machine.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,7 @@ struct regulator_init_data {
285285
int num_consumer_supplies;
286286
struct regulator_consumer_supply *consumer_supplies;
287287

288-
/* optional regulator machine specific init */
289-
int (*regulator_init)(void *driver_data);
288+
/* optional regulator machine specific data */
290289
void *driver_data; /* core does not touch this */
291290
};
292291

0 commit comments

Comments
 (0)