diff options
Diffstat (limited to 'kernel/time/clockevents.c')
-rw-r--r-- | kernel/time/clockevents.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c index 3e59fce6dd43..3d1e3e1a1971 100644 --- a/kernel/time/clockevents.c +++ b/kernel/time/clockevents.c | |||
@@ -133,7 +133,7 @@ static void clockevents_do_notify(unsigned long reason, void *dev) | |||
133 | } | 133 | } |
134 | 134 | ||
135 | /* | 135 | /* |
136 | * Called after a notify add to make devices availble which were | 136 | * Called after a notify add to make devices available which were |
137 | * released from the notifier call. | 137 | * released from the notifier call. |
138 | */ | 138 | */ |
139 | static void clockevents_notify_released(void) | 139 | static void clockevents_notify_released(void) |
@@ -218,6 +218,8 @@ void clockevents_exchange_device(struct clock_event_device *old, | |||
218 | */ | 218 | */ |
219 | void clockevents_notify(unsigned long reason, void *arg) | 219 | void clockevents_notify(unsigned long reason, void *arg) |
220 | { | 220 | { |
221 | struct list_head *node, *tmp; | ||
222 | |||
221 | spin_lock(&clockevents_lock); | 223 | spin_lock(&clockevents_lock); |
222 | clockevents_do_notify(reason, arg); | 224 | clockevents_do_notify(reason, arg); |
223 | 225 | ||
@@ -227,13 +229,8 @@ void clockevents_notify(unsigned long reason, void *arg) | |||
227 | * Unregister the clock event devices which were | 229 | * Unregister the clock event devices which were |
228 | * released from the users in the notify chain. | 230 | * released from the users in the notify chain. |
229 | */ | 231 | */ |
230 | while (!list_empty(&clockevents_released)) { | 232 | list_for_each_safe(node, tmp, &clockevents_released) |
231 | struct clock_event_device *dev; | 233 | list_del(node); |
232 | |||
233 | dev = list_entry(clockevents_released.next, | ||
234 | struct clock_event_device, list); | ||
235 | list_del(&dev->list); | ||
236 | } | ||
237 | break; | 234 | break; |
238 | default: | 235 | default: |
239 | break; | 236 | break; |