Loading drivers/mmc/core/host.c +9 −4 Original line number Diff line number Diff line Loading @@ -566,11 +566,16 @@ static ssize_t store_enable(struct device *dev, if (!host || kstrtoul(buf, 0, &value)) return -EINVAL; mmc_claim_host(host); if (!value && host->clk_scaling.enable) { /*turnning off clock scaling*/ mmc_get_card(host->card); if (!value) { /*turning off clock scaling*/ mmc_exit_clk_scaling(host); host->caps2 &= ~MMC_CAP2_CLK_SCALE; host->clk_scaling.state = MMC_LOAD_HIGH; /* Set to max. frequency when disabling */ mmc_clk_update_freq(host, host->card->clk_scaling_highest, host->clk_scaling.state); } else if (value) { /* starting clock scaling, will restart in case started */ host->caps2 |= MMC_CAP2_CLK_SCALE; Loading @@ -579,7 +584,7 @@ static ssize_t store_enable(struct device *dev, mmc_init_clk_scaling(host); } mmc_release_host(host); mmc_put_card(host->card); return count; } Loading Loading
drivers/mmc/core/host.c +9 −4 Original line number Diff line number Diff line Loading @@ -566,11 +566,16 @@ static ssize_t store_enable(struct device *dev, if (!host || kstrtoul(buf, 0, &value)) return -EINVAL; mmc_claim_host(host); if (!value && host->clk_scaling.enable) { /*turnning off clock scaling*/ mmc_get_card(host->card); if (!value) { /*turning off clock scaling*/ mmc_exit_clk_scaling(host); host->caps2 &= ~MMC_CAP2_CLK_SCALE; host->clk_scaling.state = MMC_LOAD_HIGH; /* Set to max. frequency when disabling */ mmc_clk_update_freq(host, host->card->clk_scaling_highest, host->clk_scaling.state); } else if (value) { /* starting clock scaling, will restart in case started */ host->caps2 |= MMC_CAP2_CLK_SCALE; Loading @@ -579,7 +584,7 @@ static ssize_t store_enable(struct device *dev, mmc_init_clk_scaling(host); } mmc_release_host(host); mmc_put_card(host->card); return count; } Loading