From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Len Brown <lenb@kernel.org>, linux-acpi@vger.kernel.org
Subject: Re: [PATCH 1/2] ACPI / AC: Cleanup DMI quirk table
Date: Wed, 04 Mar 2020 11:58:47 +0100 [thread overview]
Message-ID: <12572528.8LIzrmqC6W@kreacher> (raw)
In-Reply-To: <20200223142941.60705-2-hdegoede@redhat.com>
On Sunday, February 23, 2020 3:29:40 PM CET Hans de Goede wrote:
> The 3 different entries we have sofar all use different identation and
> 2 of the use DMI_MATCH where as 1 unnecessarily used DMI_EXACT_MATCH
> Fix this to just use full tab idents for each level and DMI_MATCH
> everywhere and sort the entries alphabetically.
>
> Also add a bit of text to the comments explaining why the quirk is
> necessary.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
> drivers/acpi/ac.c | 25 +++++++++++++------------
> 1 file changed, 13 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c
> index 829f37d36b9f..69d2db13886b 100644
> --- a/drivers/acpi/ac.c
> +++ b/drivers/acpi/ac.c
> @@ -293,29 +293,30 @@ static int __init ac_do_not_check_pmic_quirk(const struct dmi_system_id *d)
> return 0;
> }
>
> +/* Please keep this list alphabetically sorted */
> static const struct dmi_system_id ac_dmi_table[] __initconst = {
> {
> - /* Thinkpad e530 */
> - .callback = thinkpad_e530_quirk,
> - .matches = {
> - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> - DMI_MATCH(DMI_PRODUCT_NAME, "32597CG"),
> + /* ECS EF20EA, AXP288 PMIC but uses separate fuel-gauge */
> + .callback = ac_do_not_check_pmic_quirk,
> + .matches = {
> + DMI_MATCH(DMI_PRODUCT_NAME, "EF20EA"),
> },
> },
> {
> - /* ECS EF20EA */
> + /* Lenovo Ideapad Miix 320, AXP288 PMIC, separate fuel-gauge */
> .callback = ac_do_not_check_pmic_quirk,
> .matches = {
> - DMI_MATCH(DMI_PRODUCT_NAME, "EF20EA"),
> + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> + DMI_MATCH(DMI_PRODUCT_NAME, "80XF"),
> + DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo MIIX 320-10ICR"),
> },
> },
> {
> - /* Lenovo Ideapad Miix 320 */
> - .callback = ac_do_not_check_pmic_quirk,
> + /* Lenovo Thinkpad e530, see comment in acpi_ac_notify() */
> + .callback = thinkpad_e530_quirk,
> .matches = {
> - DMI_EXACT_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> - DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "80XF"),
> - DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "Lenovo MIIX 320-10ICR"),
> + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> + DMI_MATCH(DMI_PRODUCT_NAME, "32597CG"),
> },
> },
> {},
>
Both patches in the series applied as 5.7 material, thanks!
next prev parent reply other threads:[~2020-03-04 10:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-23 14:29 [PATCH 0/2] ACPI / AC / battery: DMI quirk cleanups Hans de Goede
2020-02-23 14:29 ` [PATCH 1/2] ACPI / AC: Cleanup DMI quirk table Hans de Goede
2020-03-04 10:58 ` Rafael J. Wysocki [this message]
2020-02-23 14:29 ` [PATCH 2/2] ACPI / battery: Cleanup Lenovo Ideapad Miix 320 DMI table entry Hans de Goede
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=12572528.8LIzrmqC6W@kreacher \
--to=rjw@rjwysocki.net \
--cc=hdegoede@redhat.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).