All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ayman Bagabas <ayman.bagabas@gmail.com>
To: Darren Hart <dvhart@infradead.org>,
	Andy Shevchenko <andy@infradead.org>,
	Ayman Bagabas <ayman.bagabas@gmail.com>,
	Takashi Iwai <tiwai@suse.de>, Mattias Jacobsson <2pi@mok.nu>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	kbuild test robot <lkp@intel.com>,
	platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] platform/x86: huawei-wmi: No need to check for battery name
Date: Fri, 18 Oct 2019 18:42:14 -0400	[thread overview]
Message-ID: <20191018224221.15495-2-ayman.bagabas@gmail.com> (raw)
In-Reply-To: <20191018224221.15495-1-ayman.bagabas@gmail.com>

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


  reply	other threads:[~2019-10-18 22:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-18 22:42 [PATCH 1/2] platform/x86: huawei-wmi: Stricter battery thresholds set Ayman Bagabas
2019-10-18 22:42 ` Ayman Bagabas [this message]
2019-10-20  0:33   ` [PATCH 2/2] platform/x86: huawei-wmi: No need to check for battery name ayman.bagabas
2019-10-19  8:31 ` [PATCH 1/2] platform/x86: huawei-wmi: Stricter battery thresholds set Dan Carpenter
2019-10-20  0:32   ` ayman.bagabas
2019-10-20  7:55     ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191018224221.15495-2-ayman.bagabas@gmail.com \
    --to=ayman.bagabas@gmail.com \
    --cc=2pi@mok.nu \
    --cc=andy@infradead.org \
    --cc=dan.carpenter@oracle.com \
    --cc=dvhart@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.