/* Hosts that support power saving can use the 'enable' and 'disable' methods to exit and enter power saving states. For more information see comments for struct mmc_host_ops.  */
int mmc_host_disable(struct mmc_host *host)
/* Hosts that support power saving can use the 'enable' and 'disable' methods to exit and enter power saving states. For more information see comments for struct mmc_host_ops.  */
int mmc_host_disable(struct mmc_host *host)
{
	int err;
	if (!(host->caps & MMC_CAP_DISABLE))
		return 0;
	if (host->en_dis_recurs)
		return 0;
	if (--host->nesting_cnt)
		return 0;
	if (!host->enabled)
		return 0;
	err = mmc_host_do_disable(host, 0);
	return err;
}