Messages in this thread | | | Date | Mon, 1 Sep 2008 03:14:19 +0400 | From | Anton Vorontsov <> | Subject | Re: [PATCH] power-supply: Add function to return system-wide power state |
| |
On Tue, Aug 26, 2008 at 09:33:27PM +0100, Matthew Garrett wrote: > Something like this?
I just applied it to battery-2.6.git with the following changes:
[...] > +int power_supply_is_system_supplied()
-() +(void)
[...] > +#ifdef CONFIG_POWER_SUPPLY
Added || defined(CONFIG_POWER_SUPPLY_MODULE)
> +extern int power_supply_is_system_supplied(void); > +#else > +static int power_supply_is_system_supplied(void) { return -ENOSYS; }
Added inline keyword, otherwise gcc might warn about defined but not used function.
Please test battery-2.6.git tree (or simply next `-next` tree ;-) if everything is okay.
Thanks again!
-- Anton Vorontsov email: cbouatmailru@gmail.com irc://irc.freenode.net/bd2
| |