Subject: [PATCH] mmc: start removing enable / disable API

From: [email-masked] (Sujit Reddy Thumma)
Date: Wed, 29 Feb 2012 11:58:45 +0530

Hi Adrian,

On 2/24/2012 4:19 PM, Adrian Hunter wrote:
> Most parts of the enable / disable API are no longer used and
> can be removed.
>
> Cc: Rajendra Nayak<[email-masked]>
> Cc: Venkatraman S<[email-masked]>
> Cc: Kukjin Kim<[email-masked]>
> Cc: Thomas Abraham<[email-masked]>
> Cc: Kyungmin Park<[email-masked]>
> Cc: Sekhar Nori<[email-masked]>
> Cc: Kevin Hilman<[email-masked]>
> Signed-off-by: Adrian Hunter<[email-masked]>
> ---
>   arch/arm/mach-exynos/mach-nuri.c           |    5 +-
>   arch/arm/mach-exynos/mach-universal_c210.c |    9 +-
>   drivers/mmc/core/core.c                    |  185 ++--------------------------
>   drivers/mmc/core/host.c                    |    1 -
>   drivers/mmc/core/host.h                    |    1 -
>   drivers/mmc/host/davinci_mmc.c             |    4 -
>   drivers/mmc/host/omap_hsmmc.c              |   15 +--
>   include/linux/mmc/core.h                   |    1 -
>   include/linux/mmc/host.h                   |   46 +-------
>   9 files changed, 25 insertions(+), 242 deletions(-)
>

> -	if (host->caps&  MMC_CAP_DISABLE)
> -		cancel_delayed_work(&host->disable);
>   	cancel_delayed_work_sync(&host->detect);
>   	mmc_flush_scheduled_work();
>
> @@ -2402,13 +2245,11 @@ int mmc_suspend_host(struct mmc_host *host)
>   {
>   	int err = 0;
>
> -	if (host->caps&  MMC_CAP_DISABLE)
> -		cancel_delayed_work(&host->disable);
>   	cancel_delayed_work(&host->detect);
>   	mmc_flush_scheduled_work();
>   	if (mmc_try_claim_host(host)) {
>   		err = mmc_cache_ctrl(host, 0);
> -		mmc_do_release_host(host);
> +		mmc_release_host(host);

mmc_try_claim_host does not call host->ops->enable(), but 
mmc_release_host call host->ops->disable(), is there any reason for 
this? For example: If host controller disable method internally calls 
clk_disable() then that would cause reference count warnings.

>   	} else {
>   		err = -EBUSY;
>   	}
> @@ -2429,7 +2270,7 @@ int mmc_suspend_host(struct mmc_host *host)

Thanks,
Sujit