Skip to content
Commit b6c57b70 authored by Armin Wolf's avatar Armin Wolf Committed by Hans de Goede
Browse files

platform/x86: dell-laptop: Do not fail when encountering unsupported batteries



If the battery hook encounters a unsupported battery, it will
return an error. This in turn will cause the battery driver to
automatically unregister the battery hook.

On machines with multiple batteries however, this will prevent
the battery hook from handling the primary battery, since it will
always get unregistered upon encountering one of the unsupported
batteries.

Fix this by simply ignoring unsupported batteries.

Reviewed-by: default avatarPali Rohár <pali@kernel.org>
Fixes: ab58016c ("platform/x86:dell-laptop: Add knobs to change battery charge settings")
Signed-off-by: default avatarArmin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20241001212835.341788-4-W_Armin@gmx.de


Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent ed0e64d8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment