All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Thadeu Lima de Souza Cascardo <cascardo@minaslivre.org>
Cc: linux-kernel@vger.kernel.org, dwmw2@infradead.org,
	Andres Salomon <dilinger@debian.org>
Subject: Re: [PATCH] power_supply: Remove capacity_level from list of sysfs attributes
Date: Wed, 6 Feb 2008 13:56:04 -0800	[thread overview]
Message-ID: <20080206135604.5473552c.akpm@linux-foundation.org> (raw)
In-Reply-To: <20080206105018.GB4232@vespa.holoscopio.com>

On Wed, 6 Feb 2008 08:50:18 -0200
Thadeu Lima de Souza Cascardo <cascardo@minaslivre.org> wrote:

> On Wed, Feb 06, 2008 at 12:53:12AM -0800, Andrew Morton wrote:
> > On Tue, 5 Feb 2008 14:13:36 -0200 Thadeu Lima de Souza Cascardo <cascardo@minaslivre.org> wrote:
> > 
> > > ---
> > >  drivers/power/power_supply_sysfs.c |    1 -
> > >  1 files changed, 0 insertions(+), 1 deletions(-)
> > > 
> > > diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c
> > > index d482484..13399d1 100644
> > > --- a/drivers/power/power_supply_sysfs.c
> > > +++ b/drivers/power/power_supply_sysfs.c
> > > @@ -106,7 +106,6 @@ static struct device_attribute power_supply_attrs[] = {
> > >  	POWER_SUPPLY_ATTR(energy_now),
> > >  	POWER_SUPPLY_ATTR(energy_avg),
> > >  	POWER_SUPPLY_ATTR(capacity),
> > > -	POWER_SUPPLY_ATTR(capacity_level),
> > >  	POWER_SUPPLY_ATTR(temp),
> > >  	POWER_SUPPLY_ATTR(temp_ambient),
> > >  	POWER_SUPPLY_ATTR(time_to_empty_now),
> > 
> > What is the reason for making this change?
> 
> Sorry. The following commit is the reason for this patch.
> 
> It removes CAPACITY_LEVEL from every other code, leaving the array with
> sysfs attributes with one more entry than the number of enums in
> power_supply.h. This leads to some attributes containing the value of
> the attribute right after it. For example, temp_ambient would have the
> value of time_to_empty_now. In my case, I had time_to_full_avg have the
> value which should be in model_name, when the former was usually empty.
> 

OK, thanks, I think I have enough material there to put together the final
patch.

Next time, please do cc the author of the change which you're fixing.  And
please do reply-to-all when working with kernel people, thanks.

I tagged this fix as needed-in-2.6.24.x as well.

  reply	other threads:[~2008-02-06 21:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-05 16:13 [PATCH] power_supply: Remove capacity_level from list of sysfs attributes Thadeu Lima de Souza Cascardo
2008-02-06  8:53 ` Andrew Morton
2008-02-06 10:50   ` Thadeu Lima de Souza Cascardo
2008-02-06 21:56     ` Andrew Morton [this message]
2008-02-07  0:02       ` Anton Vorontsov
2008-02-07  0:36         ` Andrew Morton

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=20080206135604.5473552c.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=cascardo@minaslivre.org \
    --cc=dilinger@debian.org \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@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.