Re: [PATCH] Add support for power_supply on tosa

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Dmitry Baryshkov <dbaryshkov@...>
Cc: <linux-kernel@...>, <cbou@...>, <dwmw2@...>
Date: Monday, June 23, 2008 - 2:19 am

On Fri, Jun 20, 2008 at 12:49:17PM +0400, Dmitry Baryshkov wrote:

On Sun, Jun 22, 2008 at 07:21:09PM +0400, Dmitry Baryshkov wrote:

Thanks for the patch and sorry for the delayed review. Few comments
below.


msleep() can be used here.


Ditto.


Are you sure that this needs KERN_ERR?


NOT_CHARGING is an error (usually), e.g. not charging because battery is
broken. In case of absent battery, status should be STATUS_UNKNOWN.

(..I should document that.)


Not sure if printing the notice for every status change is a good
idea...

If removed, we could also remove static char *status_text[]. :-)


The comment is contradictory. It would be better if it explained why we
want to flush scheduled work on suspend.


Because scheduled work doing tosa_bat_update() for both
tosa_bat_main and tosa_bat_jacket, such unregistering is racy. :-/

flush_scheduled_work() will not work because external_power_changed
callback might reschedule the work again.

This isn't trivial to fix, so if you don't want to fix this for now,
I think just TODO: or FIXME: ... comment will work.


-- 
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:
[PATCH] Add support for power_supply on tosa, Dmitry Baryshkov, (Fri Jun 20, 4:49 am)
Re: [PATCH] Add support for power_supply on tosa, Andrew Morton, (Tue Jul 1, 5:32 pm)
Re: [PATCH] Add support for power_supply on tosa, Anton Vorontsov, (Tue Jul 1, 5:52 pm)
Re: [PATCH] Add support for power_supply on tosa, Anton Vorontsov, (Mon Jun 23, 2:19 am)
Re: [PATCH] Add support for power_supply on tosa, Dmitry Baryshkov, (Tue Jun 24, 10:51 am)
Re: [PATCH] Add support for power_supply on tosa, Dmitry Baryshkov, (Mon Jun 30, 11:32 am)
Re: [PATCH] Add support for power_supply on tosa, Anton Vorontsov, (Mon Jun 30, 3:04 pm)
Re: [PATCH] Add support for power_supply on tosa, Dmitry Baryshkov, (Tue Jul 1, 7:52 am)
Re: [PATCH] Add support for power_supply on tosa, Dmitry Baryshkov, (Sun Jun 22, 11:21 am)