From: Len Brown <lenb@kernel.org>
To: Alexey Starikovskiy <astarikovskiy@suse.de>
Cc: maximilian attems <max@stro.at>, linux-acpi@vger.kernel.org
Subject: Re: [PATCH] ACPI: battery: add sysfs serial number
Date: Tue, 5 Feb 2008 21:09:58 -0500 [thread overview]
Message-ID: <200802052109.58454.lenb@kernel.org> (raw)
In-Reply-To: <47962F29.7000102@suse.de>
Applied.
thanks,
-Len
On Tuesday 22 January 2008 13:00, Alexey Starikovskiy wrote:
> ACK
> maximilian attems wrote:
> > egrep serial /proc/acpi/battery/BAT0/info
> > serial number: 32090
> >
> > serial number can tell you from the imminent danger
> > of beeing set on fire.
> >
> > Signed-off-by: maximilian attems <max@stro.at>
> > ---
> > drivers/acpi/battery.c | 5 +++++
> > drivers/power/power_supply_sysfs.c | 1 +
> > include/linux/power_supply.h | 1 +
> > 3 files changed, 7 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
> > index c4a769d..f6215e8 100644
> > --- a/drivers/acpi/battery.c
> > +++ b/drivers/acpi/battery.c
> > @@ -194,6 +194,9 @@ static int acpi_battery_get_property(struct power_supply *psy,
> > case POWER_SUPPLY_PROP_MANUFACTURER:
> > val->strval = battery->oem_info;
> > break;
> > + case POWER_SUPPLY_PROP_SERIAL_NUMBER:
> > + val->strval = battery->serial_number;
> > + break;
> > default:
> > return -EINVAL;
> > }
> > @@ -212,6 +215,7 @@ static enum power_supply_property charge_battery_props[] = {
> > POWER_SUPPLY_PROP_CHARGE_NOW,
> > POWER_SUPPLY_PROP_MODEL_NAME,
> > POWER_SUPPLY_PROP_MANUFACTURER,
> > + POWER_SUPPLY_PROP_SERIAL_NUMBER,
> > };
> >
> > static enum power_supply_property energy_battery_props[] = {
> > @@ -226,6 +230,7 @@ static enum power_supply_property energy_battery_props[] = {
> > POWER_SUPPLY_PROP_ENERGY_NOW,
> > POWER_SUPPLY_PROP_MODEL_NAME,
> > POWER_SUPPLY_PROP_MANUFACTURER,
> > + POWER_SUPPLY_PROP_SERIAL_NUMBER,
> > };
> > #endif
> >
> > diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c
> > index 249f61b..8feaa48 100644
> > --- a/drivers/power/power_supply_sysfs.c
> > +++ b/drivers/power/power_supply_sysfs.c
> > @@ -117,6 +117,7 @@ static struct device_attribute power_supply_attrs[] = {
> > /* Properties of type `const char *' */
> > POWER_SUPPLY_ATTR(model_name),
> > POWER_SUPPLY_ATTR(manufacturer),
> > + POWER_SUPPLY_ATTR(serial_number),
> > };
> >
> > static ssize_t power_supply_show_static_attrs(struct device *dev,
> > diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
> > index 606c095..300159b 100644
> > --- a/include/linux/power_supply.h
> > +++ b/include/linux/power_supply.h
> > @@ -101,6 +101,7 @@ enum power_supply_property {
> > /* Properties of type `const char *' */
> > POWER_SUPPLY_PROP_MODEL_NAME,
> > POWER_SUPPLY_PROP_MANUFACTURER,
> > + POWER_SUPPLY_PROP_SERIAL_NUMBER,
> > };
> >
> > enum power_supply_type {
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
prev parent reply other threads:[~2008-02-06 2:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-22 17:46 [PATCH] ACPI: battery: add sysfs serial number maximilian attems
2008-01-22 18:00 ` Alexey Starikovskiy
2008-01-22 18:07 ` maximilian attems
2008-01-22 18:15 ` Alexey Starikovskiy
2008-01-23 10:18 ` maximilian attems
2008-01-23 11:01 ` Alexey Starikovskiy
2008-01-23 11:15 ` Sjoerd Simons
2008-01-23 11:21 ` Alexey Starikovskiy
2008-02-03 11:02 ` maximilian attems
2008-02-06 2:09 ` Len Brown [this message]
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=200802052109.58454.lenb@kernel.org \
--to=lenb@kernel.org \
--cc=astarikovskiy@suse.de \
--cc=linux-acpi@vger.kernel.org \
--cc=max@stro.at \
/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