Skip to content

Commit 02915b4

Browse files
t-8chrafaeljw
authored andcommitted
ACPI: battery: Rename extensions to hook in messages
This functionality is called "hook" everywhere in the code. For consistency call it the same in the log messages. The power supply subsystem is about to get its own extension functionality. While the two are closely related and will be used together, the current wording leaves room for misinterpretation. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> Link: https://patch.msgid.link/20241205-power-supply-extensions-v5-1-f0f996db4347@weissschuh.net Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent fac04ef commit 02915b4

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

drivers/acpi/battery.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ static void battery_hook_unregister_unlocked(struct acpi_battery_hook *hook)
717717
}
718718
list_del_init(&hook->list);
719719

720-
pr_info("extension unregistered: %s\n", hook->name);
720+
pr_info("hook unregistered: %s\n", hook->name);
721721
}
722722

723723
void battery_hook_unregister(struct acpi_battery_hook *hook)
@@ -751,18 +751,18 @@ void battery_hook_register(struct acpi_battery_hook *hook)
751751
if (hook->add_battery(battery->bat, hook)) {
752752
/*
753753
* If a add-battery returns non-zero,
754-
* the registration of the extension has failed,
754+
* the registration of the hook has failed,
755755
* and we will not add it to the list of loaded
756756
* hooks.
757757
*/
758-
pr_err("extension failed to load: %s", hook->name);
758+
pr_err("hook failed to load: %s", hook->name);
759759
battery_hook_unregister_unlocked(hook);
760760
goto end;
761761
}
762762

763763
power_supply_changed(battery->bat);
764764
}
765-
pr_info("new extension: %s\n", hook->name);
765+
pr_info("new hook: %s\n", hook->name);
766766
end:
767767
mutex_unlock(&hook_mutex);
768768
}
@@ -805,10 +805,10 @@ static void battery_hook_add_battery(struct acpi_battery *battery)
805805
list_for_each_entry_safe(hook_node, tmp, &battery_hook_list, list) {
806806
if (hook_node->add_battery(battery->bat, hook_node)) {
807807
/*
808-
* The notification of the extensions has failed, to
809-
* prevent further errors we will unload the extension.
808+
* The notification of the hook has failed, to
809+
* prevent further errors we will unload the hook.
810810
*/
811-
pr_err("error in extension, unloading: %s",
811+
pr_err("error in hook, unloading: %s",
812812
hook_node->name);
813813
battery_hook_unregister_unlocked(hook_node);
814814
}

0 commit comments

Comments
 (0)