]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
platform/x86: asus-wmi: Support laptops where the first battery is named BATT
authorKristian Klausen <kristian@klausen.dk>
Tue, 3 Mar 2020 18:02:15 +0000 (19:02 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Apr 2020 14:12:05 +0000 (16:12 +0200)
commitee5e0cc2414ce947778ba91171c492937278363a
tree567a39f858dcd8efadb838ff50d80bfaaa0556e6
parentffc000d2ffe3d763f2143e2de3ea683bd056ffb9
platform/x86: asus-wmi: Support laptops where the first battery is named BATT

commit 6b3586d45bba14f6912f37488090c37a3710e7b4 upstream.

The WMI method to set the charge threshold does not provide a
way to specific a battery, so we assume it is the first/primary
battery (by checking if the name is BAT0).
On some newer ASUS laptops (Zenbook UM431DA) though, the
primary/first battery isn't named BAT0 but BATT, so we need
to support that case.

Fixes: 7973353e92ee ("platform/x86: asus-wmi: Refactor charge threshold to use the battery hooking API")
Cc: stable@vger.kernel.org
Signed-off-by: Kristian Klausen <kristian@klausen.dk>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/platform/x86/asus-wmi.c