From: Alexey Starikovskiy <aystarik@gmail.com>
To: Andrey Borzenkov <arvidjaar@mail.ru>
Cc: linux-acpi@vger.kernel.org
Subject: Re: [PATCH] 2.6.24-rc: fix ACPI battery technology reporting
Date: Mon, 12 Nov 2007 01:38:50 +0300 [thread overview]
Message-ID: <4737847A.5050702@gmail.com> (raw)
In-Reply-To: <200711102002.56951.arvidjaar@mail.ru>
Andrey Borzenkov wrote:
> Subject: [PATCH] 2.6.24-rc: fix ACPI battery technology reporting
> From: Andrey Borzenkov <arvidjaar@mail.ru>
>
> At least some systems report technology information with trailing spaces:
>
> {pts/1}% cat -E /var/tmp/bat/2.6.23 | grep type
> battery type: Li-ION $
>
> Use strncasecmp to compare model string to skip trailing part
>
> Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>
>
>
Acked-by: Alexey Starikovskiy <astarikovskiy@suse.de>
> ---
>
> drivers/acpi/battery.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
> index c2ce0ad..1905b88 100644
> --- a/drivers/acpi/battery.c
> +++ b/drivers/acpi/battery.c
> @@ -125,7 +125,7 @@ static int acpi_battery_technology(struct acpi_battery
> *battery)
> return POWER_SUPPLY_TECHNOLOGY_NiMH;
> if (!strcasecmp("LION", battery->type))
> return POWER_SUPPLY_TECHNOLOGY_LION;
> - if (!strcasecmp("LI-ION", battery->type))
> + if (!strncasecmp("LI-ION", battery->type, 6))
> return POWER_SUPPLY_TECHNOLOGY_LION;
> if (!strcasecmp("LiP", battery->type))
> return POWER_SUPPLY_TECHNOLOGY_LIPO;
>
next prev parent reply other threads:[~2007-11-11 22:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-10 17:02 [PATCH] 2.6.24-rc: fix ACPI battery technology reporting Andrey Borzenkov
2007-11-11 22:38 ` Alexey Starikovskiy [this message]
2007-12-07 3:31 ` Len Brown
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=4737847A.5050702@gmail.com \
--to=aystarik@gmail.com \
--cc=arvidjaar@mail.ru \
--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 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.