Skip to content

Commit 2de244e

Browse files
t-8chsre
authored andcommitted
ACPI: battery: Register power supply with power_supply_register()
power_supply_register_no_ws() is going to be removed. Switch to the general registration API. Signed-off-by: Thomas Weißschuh <[email protected]> Reviewed-by: Tzung-Bi Shih <[email protected]> Link: https://lore.kernel.org/r/20241005-power-supply-no-wakeup-source-v1-2-1d62bf9bcb1d@weissschuh.net Signed-off-by: Sebastian Reichel <[email protected]>
1 parent 49000fe commit 2de244e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/acpi/battery.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -847,6 +847,7 @@ static int sysfs_add_battery(struct acpi_battery *battery)
847847
struct power_supply_config psy_cfg = {
848848
.drv_data = battery,
849849
.attr_grp = acpi_battery_groups,
850+
.no_wakeup_source = true,
850851
};
851852
bool full_cap_broken = false;
852853

@@ -882,7 +883,7 @@ static int sysfs_add_battery(struct acpi_battery *battery)
882883
battery->bat_desc.type = POWER_SUPPLY_TYPE_BATTERY;
883884
battery->bat_desc.get_property = acpi_battery_get_property;
884885

885-
battery->bat = power_supply_register_no_ws(&battery->device->dev,
886+
battery->bat = power_supply_register(&battery->device->dev,
886887
&battery->bat_desc, &psy_cfg);
887888

888889
if (IS_ERR(battery->bat)) {

0 commit comments

Comments
 (0)