]> git.baikalelectronics.ru Git - kernel.git/commitdiff
platform/x86: asus-wmi: allow BAT1 battery name
authorVasiliy Kupriakov <rublag-ns@yandex.ru>
Tue, 30 Jun 2020 17:56:01 +0000 (20:56 +0300)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 9 Jul 2020 19:47:27 +0000 (22:47 +0300)
The battery on my laptop ASUS TUF Gaming FX706II is named BAT1.
This patch allows battery extension to load.

Signed-off-by: Vasiliy Kupriakov <rublag-ns@yandex.ru>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/asus-wmi.c

index 877aade194979dc6c22078cb710783bd1deda95e..8f4acdc06b1347f3d651d84b5977473994a754e5 100644 (file)
@@ -441,6 +441,7 @@ static int asus_wmi_battery_add(struct power_supply *battery)
         * battery is named BATT.
         */
        if (strcmp(battery->desc->name, "BAT0") != 0 &&
+           strcmp(battery->desc->name, "BAT1") != 0 &&
            strcmp(battery->desc->name, "BATT") != 0)
                return -ENODEV;