lkml.org 
[lkml]   [2019]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] platform/x86: huawei-wmi: No need to check for battery name
Date
No need to check for battery name, we already check if the WMI function is
available in huawei_wmi_battery_setup.
---
drivers/platform/x86/huawei-wmi.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/drivers/platform/x86/huawei-wmi.c b/drivers/platform/x86/huawei-wmi.c
index 26041d44286a..7373a65a61d3 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);

--
2.21.0
\
 
 \ /
  Last update: 2019-10-19 00:43    [W:2.137 / U:2.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site