*/
void clockevents_notify(unsigned long reason, void *arg)
{
+ struct list_head *node, *tmp;
+
spin_lock(&clockevents_lock);
clockevents_do_notify(reason, arg);
* Unregister the clock event devices which were
* released from the users in the notify chain.
*/
- while (!list_empty(&clockevents_released)) {
- struct clock_event_device *dev;
-
- dev = list_entry(clockevents_released.next,
- struct clock_event_device, list);
- list_del(&dev->list);
- }
+ list_for_each_safe(node, tmp, &clockevents_released)
+ list_del(node);
break;
default:
break;