mmc: sdhci-esdhc-imx: comment runtime_pm_get_sync() in esdhc_prepare_tuning()
authorRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 25 Apr 2014 11:59:05 +0000 (12:59 +0100)
committerChris Ball <chris@printf.net>
Thu, 22 May 2014 11:26:33 +0000 (07:26 -0400)
It is far from obvious what this is doing, and it looks like it's an
unbalanced runtime_pm_get() call.  However, the put is inside
sdhci_tasklet_finish(), so it's not unbalanced at all.  This should
be documented so people know what's going on here.  Do so.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-by: Markus Pargmann <mpa@pengutronix.de>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <chris@printf.net>
drivers/mmc/host/sdhci-esdhc-imx.c

index 5acfe2fc4fe0a4505affd89cefda09bfa1039ea9..eb7a13796bcb3313e46b6c11dc0923c5cb9b06dd 100644 (file)
@@ -695,6 +695,7 @@ static void esdhc_prepare_tuning(struct sdhci_host *host, u32 val)
        /* FIXME: delay a bit for card to be ready for next tuning due to errors */
        mdelay(1);
 
+       /* This is balanced by the runtime put in sdhci_tasklet_finish */
        pm_runtime_get_sync(host->mmc->parent);
        reg = readl(host->ioaddr + ESDHC_MIX_CTRL);
        reg |= ESDHC_MIX_CTRL_EXE_TUNE | ESDHC_MIX_CTRL_SMPCLK_SEL |