[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110103175915.GA789@srcf.ucam.org>
Date:	Mon, 3 Jan 2011 17:59:15 +0000
From:	Matthew Garrett <mjg59@...f.ucam.org>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
	lenb@...nel.org
Subject: Re: [PATCH] acpi: Update battery information on notification 0x81
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@...f.ucam.org
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Powered by blists - more mailing lists
 
