ANDROID: power_supply: Change parameter type power_supply_class inline with recent conversion
Commit71c2cc5cbf("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:dea1a925f6("ANDROID: power_supply: Add a helper function to retrieve psy array from phandle") Fixes:71c2cc5cbf("power: supply: core: make power_supply_class constant") Signed-off-by: Lee Jones <joneslee@google.com> Change-Id: Ifbc7e67499174a405a635c519ced99a57c70e819
This commit is contained in:
committed by
Treehugger Robot
parent
385f6c065c
commit
9f81255173
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user