diff options
author | Tejun Heo <tj@kernel.org> | 2012-12-21 17:56:51 -0800 |
---|---|---|
committer | Anton Vorontsov <anton.vorontsov@linaro.org> | 2013-01-05 14:03:26 -0800 |
commit | 2fbb520d2079186727786b728ebc5bf20fc85520 (patch) | |
tree | c7367c9e969e7d1e38037b58217dc4c7a71536d5 /drivers/mfd/ab8500-core.c | |
parent | 41468a11199212f092cb4c071626785db6a32393 (diff) |
charger_manager: Don't use [delayed_]work_pending()
There's no need to test whether a (delayed) work item in pending
before queueing, flushing or cancelling it. Most uses are unnecessary
and quite a few of them are buggy.
Remove unnecessary pending tests and rewrite _setup_polling() so that
it uses mod_delayed_work() if the next polling interval is sooner than
currently scheduled. queue_delayed_work() is used otherwise.
Only compile tested. I noticed that two work items - setup_polling
and cm_monitor_work - schedule each other. It's a very unusual
construct and I'm fairly sure it's racy. You can't break such
circular dependency by calling cancel on each. I strongly recommend
revising the mechanism.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Anton Vorontsov <cbou@mail.ru>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Donggeun Kim <dg77.kim@samsung.com>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Diffstat (limited to 'drivers/mfd/ab8500-core.c')
0 files changed, 0 insertions, 0 deletions