commit: http://blackfin.uclinux.org/git/?p=linux-kernel;a=commitdiff;h=d90b391e21627fc2da4bcd8f153d76eef0e30a0d branch: http://blackfin.uclinux.org/git/?p=linux-kernel;a=shortlog;h=refs/heads/trunk
We can't sleep in atomic context so we shouldn't use get_sclk() when we hold a spinlock. Use host->sclk instead. Signed-off-by: Scott Jiang <[email protected]> --- drivers/mmc/host/bfin_sdh.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/bfin_sdh.c b/drivers/mmc/host/bfin_sdh.c index fb4348c..c38ed08 100644 --- a/drivers/mmc/host/bfin_sdh.c +++ b/drivers/mmc/host/bfin_sdh.c @@ -427,7 +427,7 @@ static void sdh_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) if (ios->power_mode == MMC_POWER_ON && ios->clock) { unsigned char clk_div; - clk_div = (get_sclk() / ios->clock - 1) / 2; + clk_div = (host->sclk / ios->clock - 1) / 2; clk_div = min_t(unsigned char, clk_div, 0xFF); clk_ctl |= clk_div; clk_ctl |= CLK_E; @@ -450,7 +450,7 @@ static void sdh_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) dev_dbg(mmc_dev(host->mmc), "SDH: clk_div = 0x%x actual clock:%ld expected clock:%d\n", host->clk_div, - host->clk_div ? get_sclk() / (2 * (host->clk_div + 1)) : 0, + host->clk_div ? host->sclk / (2 * (host->clk_div + 1)) : 0, ios->clock); }
_______________________________________________ Linux-kernel-commits mailing list [email protected] https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits
