Commit 39c0a629 authored by Ayman Bagabas's avatar Ayman Bagabas Committed by Andy Shevchenko

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: 355a070b ("platform/x86: huawei-wmi: Add battery charging thresholds")
Signed-off-by: default avatarAyman Bagabas <ayman.bagabas@gmail.com>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
parent 7c675486
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment