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/clockevents.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/clockevents.c')
-rw-r--r-- | kernel/time/clockevents.c | 35 |
1 files changed, 3 insertions, 32 deletions
diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c index c6d6400ee137..dd70b4842c62 100644 --- a/kernel/time/clockevents.c +++ b/kernel/time/clockevents.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/hrtimer.h> | 15 | #include <linux/hrtimer.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/notifier.h> | ||
19 | #include <linux/smp.h> | 18 | #include <linux/smp.h> |
20 | 19 | ||
21 | #include "tick-internal.h" | 20 | #include "tick-internal.h" |
@@ -23,10 +22,6 @@ | |||
23 | /* The registered clock event devices */ | 22 | /* The registered clock event devices */ |
24 | static LIST_HEAD(clockevent_devices); | 23 | static LIST_HEAD(clockevent_devices); |
25 | static LIST_HEAD(clockevents_released); | 24 | static LIST_HEAD(clockevents_released); |
26 | |||
27 | /* Notification for clock events */ | ||
28 | static RAW_NOTIFIER_HEAD(clockevents_chain); | ||
29 | |||
30 | /* Protection for the above */ | 25 | /* Protection for the above */ |
31 | static DEFINE_RAW_SPINLOCK(clockevents_lock); | 26 | static DEFINE_RAW_SPINLOCK(clockevents_lock); |
32 | 27 | ||
@@ -232,30 +227,6 @@ int clockevents_program_event(struct clock_event_device *dev, ktime_t expires, | |||
232 | return (rc && force) ? clockevents_program_min_delta(dev) : rc; | 227 | return (rc && force) ? clockevents_program_min_delta(dev) : rc; |
233 | } | 228 | } |
234 | 229 | ||
235 | /** | ||
236 | * clockevents_register_notifier - register a clock events change listener | ||
237 | */ | ||
238 | int clockevents_register_notifier(struct notifier_block *nb) | ||
239 | { | ||
240 | unsigned long flags; | ||
241 | int ret; | ||
242 | |||
243 | raw_spin_lock_irqsave(&clockevents_lock, flags); | ||
244 | ret = raw_notifier_chain_register(&clockevents_chain, nb); | ||
245 | raw_spin_unlock_irqrestore(&clockevents_lock, flags); | ||
246 | |||
247 | return ret; | ||
248 | } | ||
249 | |||
250 | /* | ||
251 | * Notify about a clock event change. Called with clockevents_lock | ||
252 | * held. | ||
253 | */ | ||
254 | static void clockevents_do_notify(unsigned long reason, void *dev) | ||
255 | { | ||
256 | raw_notifier_call_chain(&clockevents_chain, reason, dev); | ||
257 | } | ||
258 | |||
259 | /* | 230 | /* |
260 | * Called after a notify add to make devices available which were | 231 | * Called after a notify add to make devices available which were |
261 | * released from the notifier call. | 232 | * released from the notifier call. |
@@ -269,7 +240,7 @@ static void clockevents_notify_released(void) | |||
269 | struct clock_event_device, list); | 240 | struct clock_event_device, list); |
270 | list_del(&dev->list); | 241 | list_del(&dev->list); |
271 | list_add(&dev->list, &clockevent_devices); | 242 | list_add(&dev->list, &clockevent_devices); |
272 | clockevents_do_notify(CLOCK_EVT_NOTIFY_ADD, dev); | 243 | tick_check_new_device(dev); |
273 | } | 244 | } |
274 | } | 245 | } |
275 | 246 | ||
@@ -290,7 +261,7 @@ void clockevents_register_device(struct clock_event_device *dev) | |||
290 | raw_spin_lock_irqsave(&clockevents_lock, flags); | 261 | raw_spin_lock_irqsave(&clockevents_lock, flags); |
291 | 262 | ||
292 | list_add(&dev->list, &clockevent_devices); | 263 | list_add(&dev->list, &clockevent_devices); |
293 | clockevents_do_notify(CLOCK_EVT_NOTIFY_ADD, dev); | 264 | tick_check_new_device(dev); |
294 | clockevents_notify_released(); | 265 | clockevents_notify_released(); |
295 | 266 | ||
296 | raw_spin_unlock_irqrestore(&clockevents_lock, flags); | 267 | raw_spin_unlock_irqrestore(&clockevents_lock, flags); |
@@ -433,7 +404,7 @@ void clockevents_notify(unsigned long reason, void *arg) | |||
433 | int cpu; | 404 | int cpu; |
434 | 405 | ||
435 | raw_spin_lock_irqsave(&clockevents_lock, flags); | 406 | raw_spin_lock_irqsave(&clockevents_lock, flags); |
436 | clockevents_do_notify(reason, arg); | 407 | tick_notify(reason, arg); |
437 | 408 | ||
438 | switch (reason) { | 409 | switch (reason) { |
439 | case CLOCK_EVT_NOTIFY_CPU_DEAD: | 410 | case CLOCK_EVT_NOTIFY_CPU_DEAD: |