From: lintao Date: Wed, 28 May 2014 00:31:14 +0000 (+0800) Subject: mmc: host: rk_sdmmc: X-Git-Tag: firefly_0821_release~5212 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=dc0f554d9f3f9a7fe498e8a89c05ebc168ce4fbb;p=firefly-linux-kernel-4.4.55.git mmc: host: rk_sdmmc: Use clk subsystem interface to judge enable_cnt refer number --- diff --git a/drivers/mmc/host/rk_sdmmc.c b/drivers/mmc/host/rk_sdmmc.c index 6ba6bf6d2e87..cdd63807a1f0 100755 --- a/drivers/mmc/host/rk_sdmmc.c +++ b/drivers/mmc/host/rk_sdmmc.c @@ -1259,15 +1259,15 @@ static int dw_mci_set_sdio_status(struct mmc_host *mmc, int val) spin_lock_bh(&host->lock); if(val){ set_bit(DW_MMC_CARD_PRESENT, &slot->flags); - if(host->hclk_mmc->enable_count == 0) + if(__clk_is_enabled(host->hclk_mmc) == false) clk_prepare_enable(host->hclk_mmc); - if(host->clk_mmc->enable_count == 0) + if(__clk_is_enabled(host->clk_mmc) == false) clk_prepare_enable(host->clk_mmc); }else{ clear_bit(DW_MMC_CARD_PRESENT, &slot->flags); - if(host->clk_mmc->enable_count != 0) + if(__clk_is_enabled(host->clk_mmc) == true) clk_disable_unprepare(slot->host->clk_mmc); - if(host->hclk_mmc->enable_count != 0) + if(__clk_is_enabled(host->hclk_mmc) == true) clk_disable_unprepare(slot->host->hclk_mmc); } spin_unlock_bh(&host->lock);