mmc: sdhci-s3c: add spin_unlock_irq() before calling clk_round_rate
authorJaehoon Chung <jh80.chung@samsung.com>
Wed, 30 Nov 2016 06:05:42 +0000 (15:05 +0900)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 5 Dec 2016 09:31:17 +0000 (10:31 +0100)
Before calling clk_round_rate(), put the spin_unlock_irq() in
sdhci_s3c_consider_clock() function.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-s3c.c

index 784c5a848fb4fb9e7f4581cfce5e8aac6e04aa83..de219ca7ea7c398d73e250f0d281b4e1fdc0a2db 100644 (file)
@@ -121,7 +121,9 @@ static unsigned int sdhci_s3c_consider_clock(struct sdhci_s3c *ourhost,
         * speed possible with selected clock source and skip the division.
         */
        if (ourhost->no_divider) {
+               spin_unlock_irq(&ourhost->host->lock);
                rate = clk_round_rate(clksrc, wanted);
+               spin_lock_irq(&ourhost->host->lock);
                return wanted - rate;
        }