Messages in this thread Patch in this message | ![/](/images/icornerl.gif) | | Date | Mon, 29 Apr 2024 16:45:29 +0200 | Subject | [PATCH v2 06/12] regulator/core: remove regulator_init callback | From | Michał Mirosław <> |
| |
There are no in-tree users. The only usage went away in 2019 in 8c44e448583c ("regulator: stpmic1: Simplify regulators registration").
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> --- drivers/regulator/core.c | 7 ------- include/linux/regulator/machine.h | 7 ++----- 2 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 4cb30e49c03d..be45983e1d23 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -5679,13 +5679,6 @@ regulator_register(struct device *dev, resolved_early = true; } - /* perform any regulator specific init */ - if (init_data && init_data->regulator_init) { - ret = init_data->regulator_init(rdev->reg_data); - if (ret < 0) - goto wash; - } - if (config->ena_gpiod) { ret = regulator_ena_gpio_request(rdev, config); if (ret != 0) { diff --git a/include/linux/regulator/machine.h b/include/linux/regulator/machine.h index 0cd76d264727..7c39dbc33290 100644 --- a/include/linux/regulator/machine.h +++ b/include/linux/regulator/machine.h @@ -274,8 +274,7 @@ struct regulator_consumer_supply { * @num_consumer_supplies: Number of consumer device supplies. * @consumer_supplies: Consumer device supply configuration. * - * @regulator_init: Callback invoked when the regulator has been registered. - * @driver_data: Data passed to regulator_init. + * @driver_data: Pointer copied to regulator_dev.reg_data. */ struct regulator_init_data { const char *supply_regulator; /* or NULL for system supply */ @@ -285,9 +284,7 @@ struct regulator_init_data { int num_consumer_supplies; struct regulator_consumer_supply *consumer_supplies; - /* optional regulator machine specific init */ - int (*regulator_init)(void *driver_data); - void *driver_data; /* core does not touch this */ + void *driver_data; }; #ifdef CONFIG_REGULATOR -- 2.39.2
| ![\](/images/icornerr.gif) |