diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2013-04-25 16:31:49 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2013-05-16 05:09:17 -0400 |
commit | ccf33d6880f39a35158fff66db13000ae4943fac (patch) | |
tree | a39cb95e64c412b107c8640ae521bda78a7d1033 /kernel/time/clockevents.c | |
parent | 8c53daf63f56791ed47fc585206ef3049489612f (diff) |
clockevents: Add module refcount
We want to be able to remove clockevent modules as well. Add a
refcount so we don't remove a module with an active clock event
device.
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.307435149@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/time/clockevents.c')
-rw-r--r-- | kernel/time/clockevents.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c index 0e3a8448e115..89e394caa769 100644 --- a/kernel/time/clockevents.c +++ b/kernel/time/clockevents.c | |||
@@ -357,6 +357,7 @@ void clockevents_exchange_device(struct clock_event_device *old, | |||
357 | * released list and do a notify add later. | 357 | * released list and do a notify add later. |
358 | */ | 358 | */ |
359 | if (old) { | 359 | if (old) { |
360 | module_put(old->owner); | ||
360 | clockevents_set_mode(old, CLOCK_EVT_MODE_UNUSED); | 361 | clockevents_set_mode(old, CLOCK_EVT_MODE_UNUSED); |
361 | list_del(&old->list); | 362 | list_del(&old->list); |
362 | list_add(&old->list, &clockevents_released); | 363 | list_add(&old->list, &clockevents_released); |