Re: [PATCH] power-supply: Add function to return system-wide powerstate

From: Anton Vorontsov
Date: Sun Aug 31 2008 - 19:14:36 EST


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@xxxxxxxxx
irc://irc.freenode.net/bd2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/