diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2013-04-25 16:31:47 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2013-05-16 05:09:16 -0400 |
commit | 7172a286ced0c1f4f239a0fa09db54ed37d3ead2 (patch) | |
tree | c70ffdd57d6f980e0e2d0bc78951bc35089c5565 /kernel/time/tick-common.c | |
parent | a89c7edbe7d7aa80f507915f3dd801211b116b79 (diff) |
clockevents: Get rid of the notifier chain
7+ years and still a single user. Kill it.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Magnus Damm <magnus.damm@gmail.com>
Link: http://lkml.kernel.org/r/20130425143436.098520211@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/time/tick-common.c')
-rw-r--r-- | kernel/time/tick-common.c | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c index 5d3fb100bc06..dbf4e18d5101 100644 --- a/kernel/time/tick-common.c +++ b/kernel/time/tick-common.c | |||
@@ -208,11 +208,11 @@ static void tick_setup_device(struct tick_device *td, | |||
208 | /* | 208 | /* |
209 | * Check, if the new registered device should be used. | 209 | * Check, if the new registered device should be used. |
210 | */ | 210 | */ |
211 | static int tick_check_new_device(struct clock_event_device *newdev) | 211 | void tick_check_new_device(struct clock_event_device *newdev) |
212 | { | 212 | { |
213 | struct clock_event_device *curdev; | 213 | struct clock_event_device *curdev; |
214 | struct tick_device *td; | 214 | struct tick_device *td; |
215 | int cpu, ret = NOTIFY_OK; | 215 | int cpu; |
216 | unsigned long flags; | 216 | unsigned long flags; |
217 | 217 | ||
218 | raw_spin_lock_irqsave(&tick_device_lock, flags); | 218 | raw_spin_lock_irqsave(&tick_device_lock, flags); |
@@ -275,18 +275,14 @@ static int tick_check_new_device(struct clock_event_device *newdev) | |||
275 | tick_oneshot_notify(); | 275 | tick_oneshot_notify(); |
276 | 276 | ||
277 | raw_spin_unlock_irqrestore(&tick_device_lock, flags); | 277 | raw_spin_unlock_irqrestore(&tick_device_lock, flags); |
278 | return NOTIFY_STOP; | 278 | return; |
279 | 279 | ||
280 | out_bc: | 280 | out_bc: |
281 | /* | 281 | /* |
282 | * Can the new device be used as a broadcast device ? | 282 | * Can the new device be used as a broadcast device ? |
283 | */ | 283 | */ |
284 | if (tick_check_broadcast_device(newdev)) | 284 | tick_install_broadcast_device(newdev); |
285 | ret = NOTIFY_STOP; | ||
286 | |||
287 | raw_spin_unlock_irqrestore(&tick_device_lock, flags); | 285 | raw_spin_unlock_irqrestore(&tick_device_lock, flags); |
288 | |||
289 | return ret; | ||
290 | } | 286 | } |
291 | 287 | ||
292 | /* | 288 | /* |
@@ -360,17 +356,10 @@ static void tick_resume(void) | |||
360 | raw_spin_unlock_irqrestore(&tick_device_lock, flags); | 356 | raw_spin_unlock_irqrestore(&tick_device_lock, flags); |
361 | } | 357 | } |
362 | 358 | ||
363 | /* | 359 | void tick_notify(unsigned long reason, void *dev) |
364 | * Notification about clock event devices | ||
365 | */ | ||
366 | static int tick_notify(struct notifier_block *nb, unsigned long reason, | ||
367 | void *dev) | ||
368 | { | 360 | { |
369 | switch (reason) { | 361 | switch (reason) { |
370 | 362 | ||
371 | case CLOCK_EVT_NOTIFY_ADD: | ||
372 | return tick_check_new_device(dev); | ||
373 | |||
374 | case CLOCK_EVT_NOTIFY_BROADCAST_ON: | 363 | case CLOCK_EVT_NOTIFY_BROADCAST_ON: |
375 | case CLOCK_EVT_NOTIFY_BROADCAST_OFF: | 364 | case CLOCK_EVT_NOTIFY_BROADCAST_OFF: |
376 | case CLOCK_EVT_NOTIFY_BROADCAST_FORCE: | 365 | case CLOCK_EVT_NOTIFY_BROADCAST_FORCE: |
@@ -404,21 +393,12 @@ static int tick_notify(struct notifier_block *nb, unsigned long reason, | |||
404 | default: | 393 | default: |
405 | break; | 394 | break; |
406 | } | 395 | } |
407 | |||
408 | return NOTIFY_OK; | ||
409 | } | 396 | } |
410 | 397 | ||
411 | static struct notifier_block tick_notifier = { | ||
412 | .notifier_call = tick_notify, | ||
413 | }; | ||
414 | |||
415 | /** | 398 | /** |
416 | * tick_init - initialize the tick control | 399 | * tick_init - initialize the tick control |
417 | * | ||
418 | * Register the notifier with the clockevents framework | ||
419 | */ | 400 | */ |
420 | void __init tick_init(void) | 401 | void __init tick_init(void) |
421 | { | 402 | { |
422 | clockevents_register_notifier(&tick_notifier); | ||
423 | tick_broadcast_init(); | 403 | tick_broadcast_init(); |
424 | } | 404 | } |