Skip to content

Commit

Permalink
regulator: Switch back to struct platform_driver::remove()
Browse files Browse the repository at this point in the history
After commit 0edb555 ("platform: Make platform_driver::remove()
return void") .remove() is (again) the right callback to implement for
platform drivers.

Convert all platform drivers below drivers/regulator to use .remove(),
with the eventual goal to drop struct platform_driver::remove_new(). As
.remove() and .remove_new() have the same prototypes, conversion is done
by just changing the structure member name in the driver initializer.

A few whitespace changes are done en passant to make indention
consistent.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/ab85510f83fa901e44d5d563fe6e768054229bfe.1731398433.git.u.kleine-koenig@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Uwe Kleine-König authored and Mark Brown committed Nov 12, 2024
1 parent d1bc2d5 commit 1b55354
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
12 changes: 6 additions & 6 deletions drivers/regulator/arizona-ldo1.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,18 +375,18 @@ static int madera_ldo1_probe(struct platform_device *pdev)

static struct platform_driver arizona_ldo1_driver = {
.probe = arizona_ldo1_probe,
.remove_new = arizona_ldo1_remove,
.driver = {
.name = "arizona-ldo1",
.remove = arizona_ldo1_remove,
.driver = {
.name = "arizona-ldo1",
.probe_type = PROBE_FORCE_SYNCHRONOUS,
},
};

static struct platform_driver madera_ldo1_driver = {
.probe = madera_ldo1_probe,
.remove_new = arizona_ldo1_remove,
.driver = {
.name = "madera-ldo1",
.remove = arizona_ldo1_remove,
.driver = {
.name = "madera-ldo1",
.probe_type = PROBE_FORCE_SYNCHRONOUS,
},
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/regulator/bd9571mwv-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ static struct platform_driver bd9571mwv_regulator_driver = {
.pm = DEV_PM_OPS,
},
.probe = bd9571mwv_regulator_probe,
.remove_new = bd9571mwv_regulator_remove,
.remove = bd9571mwv_regulator_remove,
.id_table = bd9571mwv_regulator_id_table,
};
module_platform_driver(bd9571mwv_regulator_driver);
Expand Down
2 changes: 1 addition & 1 deletion drivers/regulator/db8500-prcmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ static struct platform_driver db8500_regulator_driver = {
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
},
.probe = db8500_regulator_probe,
.remove_new = db8500_regulator_remove,
.remove = db8500_regulator_remove,
};

static int __init db8500_regulator_init(void)
Expand Down
2 changes: 1 addition & 1 deletion drivers/regulator/stm32-vrefbuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ MODULE_DEVICE_TABLE(of, stm32_vrefbuf_of_match);

static struct platform_driver stm32_vrefbuf_driver = {
.probe = stm32_vrefbuf_probe,
.remove_new = stm32_vrefbuf_remove,
.remove = stm32_vrefbuf_remove,
.driver = {
.name = "stm32-vrefbuf",
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
Expand Down
2 changes: 1 addition & 1 deletion drivers/regulator/uniphier-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ MODULE_DEVICE_TABLE(of, uniphier_regulator_match);

static struct platform_driver uniphier_regulator_driver = {
.probe = uniphier_regulator_probe,
.remove_new = uniphier_regulator_remove,
.remove = uniphier_regulator_remove,
.driver = {
.name = "uniphier-regulator",
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
Expand Down
2 changes: 1 addition & 1 deletion drivers/regulator/userspace-consumer.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ MODULE_DEVICE_TABLE(of, regulator_userspace_consumer_of_match);

static struct platform_driver regulator_userspace_consumer_driver = {
.probe = regulator_userspace_consumer_probe,
.remove_new = regulator_userspace_consumer_remove,
.remove = regulator_userspace_consumer_remove,
.driver = {
.name = "reg-userspace-consumer",
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
Expand Down
2 changes: 1 addition & 1 deletion drivers/regulator/virtual.c
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ static void regulator_virtual_remove(struct platform_device *pdev)

static struct platform_driver regulator_virtual_consumer_driver = {
.probe = regulator_virtual_probe,
.remove_new = regulator_virtual_remove,
.remove = regulator_virtual_remove,
.driver = {
.name = "reg-virt-consumer",
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
Expand Down
6 changes: 3 additions & 3 deletions drivers/regulator/wm8350-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -1304,9 +1304,9 @@ EXPORT_SYMBOL_GPL(wm8350_register_led);

static struct platform_driver wm8350_regulator_driver = {
.probe = wm8350_regulator_probe,
.remove_new = wm8350_regulator_remove,
.driver = {
.name = "wm8350-regulator",
.remove = wm8350_regulator_remove,
.driver = {
.name = "wm8350-regulator",
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
},
};
Expand Down

0 comments on commit 1b55354

Please sign in to comment.