lkml.org 
[lkml]   [2008]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2008-09-01 01:17    [W:0.035 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site