ANDROID: power_supply: Change parameter type power_supply_class inline with recent conversion

Commit 71c2cc5cbf ("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, &param,
          |                                     ^~~~~~~~~~~~~~~~~~
          |                                     &

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:
Lee Jones
2024-04-08 15:34:14 +01:00
committed by Treehugger Robot
parent 385f6c065c
commit 9f81255173
+1 -1
View File
@@ -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, &param,
ret = class_for_each_device(&power_supply_class, NULL, &param,
power_supply_match_device_node_array);
of_node_put(power_supply_np);