diff options
author | Viresh Kumar <[email protected]> | 2015-02-27 17:21:34 +0530 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2015-03-27 10:26:20 +0100 |
commit | de81e64b250d3865a75d221a80b4311e3273670a (patch) | |
tree | 63711fb3ef4dcfb75f928c0e38c85b6060532123 | |
parent | 77e32c89a7117614ab3d66d20c1088de721abfaa (diff) |
clockevents: Don't validate dev->mode against CLOCK_EVT_MODE_UNUSED for new interface
It was a requirement in the legacy interface that drivers must
initialize ->mode field to 'CLOCK_EVT_MODE_UNUSED'. This field
isn't used anymore by the new interface and so should be only
checked for the legacy interface.
Probably it can be dropped as well as core doesn't rely on it
anymore, but lets keep it to support legacy interface.
Signed-off-by: Viresh Kumar <[email protected]>
Acked-by: Peter Zijlstra <[email protected]>
Cc: Daniel Lezcano <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Kevin Hilman <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Preeti U Murthy <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/r/c6604fa1a77fe1fc8dcab87769857228fb1dadd5.1425037853.git.viresh.kumar@linaro.org
Signed-off-by: Ingo Molnar <[email protected]>
-rw-r--r-- | kernel/time/clockevents.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c index 6e53e9a0c2e8..73689df1e4b8 100644 --- a/kernel/time/clockevents.c +++ b/kernel/time/clockevents.c @@ -450,6 +450,8 @@ static int clockevents_sanity_check(struct clock_event_device *dev) /* We shouldn't be supporting new modes now */ WARN_ON(dev->set_state_periodic || dev->set_state_oneshot || dev->set_state_shutdown || dev->tick_resume); + + BUG_ON(dev->mode != CLOCK_EVT_MODE_UNUSED); return 0; } @@ -479,7 +481,6 @@ void clockevents_register_device(struct clock_event_device *dev) { unsigned long flags; - BUG_ON(dev->mode != CLOCK_EVT_MODE_UNUSED); BUG_ON(clockevents_sanity_check(dev)); /* Initialize state to DETACHED */ |