From 9f81255173e97d0108b5eb930c1dc635eb734e7c Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Mon, 8 Apr 2024 15:34:14 +0100 Subject: [PATCH] ANDROID: power_supply: Change parameter type power_supply_class inline with recent conversion Commit 71c2cc5cbf68 ("power: supply: core: make power_supply_class constant") constified power_supply_class and started passing it around by reference. This commit brings our out-of-tree code back inline with the API. Fixes the following compiler error: drivers/power/supply/power_supply_core.c:605:30: error: passing 'const struct class' to parameter of incompatible type 'const struct class *'; take the address with & 605 | ret = class_for_each_device(power_supply_class, NULL, ¶m, | ^~~~~~~~~~~~~~~~~~ | & Fixes: dea1a925f6a1 ("ANDROID: power_supply: Add a helper function to retrieve psy array from phandle") Fixes: 71c2cc5cbf68 ("power: supply: core: make power_supply_class constant") Signed-off-by: Lee Jones Change-Id: Ifbc7e67499174a405a635c519ced99a57c70e819 --- drivers/power/supply/power_supply_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/supply/power_supply_core.c b/drivers/power/supply/power_supply_core.c index 6373684a6508..16021c91f8c0 100644 --- a/drivers/power/supply/power_supply_core.c +++ b/drivers/power/supply/power_supply_core.c @@ -602,7 +602,7 @@ int power_supply_get_by_phandle_array(struct device_node *np, param.psy = psy; param.psy_size = size; param.psy_count = 0; - ret = class_for_each_device(power_supply_class, NULL, ¶m, + ret = class_for_each_device(&power_supply_class, NULL, ¶m, power_supply_match_device_node_array); of_node_put(power_supply_np);