/* Returns %1 if the host is claimed, %0 otherwise.  */
int mmc_try_claim_host(struct mmc_host *host)
/* Returns %1 if the host is claimed, %0 otherwise.  */
int mmc_try_claim_host(struct mmc_host *host)
{
	int claimed_host = 0;
	unsigned long flags;
	spin_lock_irqsave(&host->lock, flags);
	if (!host->claimed || host->claimer == current) {
		host->claimed = 1;
		host->claimer = current;
		host->claim_cnt += 1;
		claimed_host = 1;
	}
	spin_unlock_irqrestore(&host->lock, flags);
	return claimed_host;
}