/* This function queues the notification function of the event for future execution.  */
static void efi_queue_event(struct efi_event *event)
/* This function queues the notification function of the event for future execution.  */
static void efi_queue_event(struct efi_event *event)
{
	struct efi_event *item = NULL;
	if (!event->notify_function)
		return;
	if (!efi_event_is_queued(event)) {
		list_for_each_entry(item, &efi_event_queue, queue_link) {
			if (item->notify_tpl < event->notify_tpl) {
				list_add_tail(&event->queue_link,
					      &item->queue_link);
				event = NULL;
				break;
			}
		}
		if (event)
			list_add_tail(&event->queue_link, &efi_event_queue);
	}
	efi_process_event_queue();
}