public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Garrett <mjg59@srcf.ucam.org>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	lenb@kernel.org
Subject: Re: [PATCH] acpi: Update battery information on notification 0x81
Date: Mon, 3 Jan 2011 17:59:15 +0000	[thread overview]
Message-ID: <20110103175915.GA789@srcf.ucam.org> (raw)
In-Reply-To: <201012232323.42702.rjw@sisk.pl>

On Thu, Dec 23, 2010 at 11:23:42PM +0100, Rafael J. Wysocki wrote:

> As I've already said on IRC, I'd simply add a new function like:
> 
> void acpi_battery_refresh(struct acpi_battery *battery)
> {
> 	if (!battery->bat.dev)
> 		return;
> 	acpi_battery_get_info(battery);
> 	/* The battery may have changed its reporting units */
> 	sysfs_remove_battery(battery);
> 	sysfs_add_battery(battery);
> }
> 
> and call it before acpi_battery_update()
> (a) in acpi_battery_resume()
> (b) in acpi_battery_notify() if event == ACPI_BATTERY_NOTIFY_INFO
> 
> That would be more straightforward IMHO.

That might be more reasonable. Want to send that, or shall I?

-- 
Matthew Garrett | mjg59@srcf.ucam.org

  reply	other threads:[~2011-01-03 17:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-16 20:32 [PATCH] acpi: Update battery information on notification 0x81 Matthew Garrett
2010-08-31  9:06 ` Richard Hughes
2010-12-15 17:19 ` Matthew Garrett
2010-12-23 21:16   ` Matthew Garrett
2010-12-23 22:23     ` Rafael J. Wysocki
2011-01-03 17:59       ` Matthew Garrett [this message]
2011-01-03 20:56         ` Rafael J. Wysocki

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=20110103175915.GA789@srcf.ucam.org \
    --to=mjg59@srcf.ucam.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@sisk.pl \
    /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