This is something Thomas already dropped, and I'm just sticking
with that .. If you register your clocksource _twice_ your kernel will
likely not work correctly (and might crash).
Signed-Off-By: Daniel Walker <[email protected]>
---
kernel/time/clocksource.c | 19 ++++++-------------
1 file changed, 6 insertions(+), 13 deletions(-)
Index: linux-2.6.19/kernel/time/clocksource.c
===================================================================
--- linux-2.6.19.orig/kernel/time/clocksource.c
+++ linux-2.6.19/kernel/time/clocksource.c
@@ -186,16 +186,12 @@ int clocksource_register(struct clocksou
unsigned long flags;
spin_lock_irqsave(&clocksource_lock, flags);
- if (unlikely(!list_empty(&c->list) && __is_registered(c->name))) {
- printk("register_clocksource: Cannot register %s clocksource. "
- "Already registered!", c->name);
- ret = -EBUSY;
- } else {
- INIT_LIST_HEAD(&c->list);
- __sorted_list_add(c);
- /* scan the registered clocksources, and pick the best one */
- next_clocksource = select_clocksource();
- }
+ __sorted_list_add(c);
+
+ /*
+ * scan the registered clocksources, and pick the best one
+ */
+ next_clocksource = select_clocksource();
spin_unlock_irqrestore(&clocksource_lock, flags);
return ret;
}
@@ -212,9 +208,6 @@ void clocksource_rating_change(struct cl
{
unsigned long flags;
- if (unlikely(list_empty(&c->list)))
- return;
-
spin_lock_irqsave(&clocksource_lock, flags);
/*
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]