From: Ayman Bagabas Date: Sun, 20 Oct 2019 17:00:08 +0000 (-0400) Subject: platform/x86: huawei-wmi: No need to check for battery name X-Git-Tag: v5.5-rc1~91^2~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39c0a6295e3a270e17022db71c71aa637c3d4695;p=thirdparty%2Fkernel%2Flinux.git platform/x86: huawei-wmi: No need to check for battery name No need to check for battery name, we already check if the WMI function is available in huawei_wmi_battery_setup. Fixes: 355a070b09ab ("platform/x86: huawei-wmi: Add battery charging thresholds") Signed-off-by: Ayman Bagabas Signed-off-by: Andy Shevchenko --- diff --git a/drivers/platform/x86/huawei-wmi.c b/drivers/platform/x86/huawei-wmi.c index 26041d44286a9..7373a65a61d3c 100644 --- a/drivers/platform/x86/huawei-wmi.c +++ b/drivers/platform/x86/huawei-wmi.c @@ -471,10 +471,6 @@ static DEVICE_ATTR_RW(charge_control_thresholds); static int huawei_wmi_battery_add(struct power_supply *battery) { - /* Huawei laptops come with one battery only */ - if (strcmp(battery->desc->name, "BAT") != 1) - return -ENODEV; - device_create_file(&battery->dev, &dev_attr_charge_control_start_threshold); device_create_file(&battery->dev, &dev_attr_charge_control_end_threshold);