Revert "mmc: core: Remove the ->enable|disable() callbacks"

This reverts commit 4043326733 as
MSM platforms still needs ->enable/disable() callbacks.

Conflicts:
	drivers/mmc/core/core.c

Change-Id: Ifd986825c10f1475bfcdac37ea1f3b99e5f6daaf
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
This commit is contained in:
Subhash Jadavani 2016-04-27 17:19:29 -07:00
parent 15685a80db
commit 9df78479e4
2 changed files with 12 additions and 0 deletions

View file

@ -988,6 +988,9 @@ int __mmc_claim_host(struct mmc_host *host, atomic_t *abort)
if (pm)
pm_runtime_get_sync(mmc_dev(host));
if (host->ops->enable && !stop && host->claim_cnt == 1)
host->ops->enable(host);
return stop;
}
EXPORT_SYMBOL(__mmc_claim_host);
@ -1005,6 +1008,9 @@ void mmc_release_host(struct mmc_host *host)
WARN_ON(!host->claimed);
if (host->ops->disable && host->claim_cnt == 1)
host->ops->disable(host);
spin_lock_irqsave(&host->lock, flags);
if (--host->claim_cnt) {
/* Release for nested claim */

View file

@ -80,6 +80,12 @@ struct mmc_ios {
};
struct mmc_host_ops {
/*
* 'enable' is called when the host is claimed and 'disable' is called
* when the host is released. 'enable' and 'disable' are deprecated.
*/
int (*enable)(struct mmc_host *host);
int (*disable)(struct mmc_host *host);
/*
* It is optional for the host to implement pre_req and post_req in
* order to support double buffering of requests (prepare one