]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ASoC: Intel: cleanup runtime_pm initialization
authorVinod Koul <vinod.koul@intel.com>
Wed, 19 Nov 2014 09:43:26 +0000 (15:13 +0530)
committerMark Brown <broonie@kernel.org>
Wed, 19 Nov 2014 10:56:46 +0000 (10:56 +0000)
For ACPI we missed to pm_runtime_enable() call which is required to tell PM
core that runtime on this device is enabled now. Since this is common to
both PCI and APCI move it out. Also for ACPI we do not require
pm_runtime_allow() call, so remove that

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/sst/sst.c

index b2b5604943b540043fe4618a6e6eb916d80795d2..9e68a7cefd1bf8ea1686611ebd4af9cc94c28b5e 100644 (file)
@@ -378,13 +378,13 @@ void sst_configure_runtime_pm(struct intel_sst_drv *ctx)
         * initially active. So change the state to active before
         * enabling the pm
         */
-       if (acpi_disabled) {
+       pm_runtime_enable(ctx->dev);
+
+       if (acpi_disabled)
                pm_runtime_set_active(ctx->dev);
-               pm_runtime_enable(ctx->dev);
-       } else {
-               pm_runtime_allow(ctx->dev);
+       else
                pm_runtime_put_noidle(ctx->dev);
-       }
+
        sst_save_shim64(ctx, ctx->shim, ctx->shim_regs64);
 }
 EXPORT_SYMBOL_GPL(sst_configure_runtime_pm);