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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Anton Vorontsov
Date: Tuesday, August 26, 2008 - 1:25 pm

On Tue, Aug 26, 2008 at 09:09:59PM +0100, Matthew Garrett wrote:

I like the patch, much thanks!

One comment below.


May I suggest adding
static int power_supply_is_system_supplied(void) { return -ENOSYS; }
in case of !CONFIG_POWER_SUPPLY? This way drivers may not strictly
depend on power supply class.

And "if (power_supply_is_system_supplied())" will assume that we're
always supplied, which good assumption, I think.

Thanks,

-- 
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] power-supply: Add function to return system-wi ..., Anton Vorontsov, (Tue Aug 26, 1:25 pm)