/* Returns: 0 if there are waiters (wait_for_completion() in progress) 1 if there are no waiters.  */
bool completion_done(struct completion *x)
/* Returns: 0 if there are waiters (wait_for_completion() in progress) 1 if there are no waiters.  */
bool completion_done(struct completion *x)
{
	unsigned long flags;
	int ret = 1;
	spin_lock_irqsave(&x->wait.lock, flags);
	if (!x->done)
		ret = 0;
	spin_unlock_irqrestore(&x->wait.lock, flags);
	return ret;
}