From patchwork Wed Nov 19 09:43:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 5335711 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 60E7BC11AC for ; Wed, 19 Nov 2014 09:49:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 92AF620160 for ; Wed, 19 Nov 2014 09:49:56 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 8641D20114 for ; Wed, 19 Nov 2014 09:49:54 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 918E1265483; Wed, 19 Nov 2014 10:49:50 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 4B858260555; Wed, 19 Nov 2014 10:49:45 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id BAF10265083; Wed, 19 Nov 2014 10:49:44 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by alsa0.perex.cz (Postfix) with ESMTP id 45FAF26053C for ; Wed, 19 Nov 2014 10:49:35 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 19 Nov 2014 01:42:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,415,1413270000"; d="scan'208";a="634399264" Received: from vkoul-udesk3.iind.intel.com (HELO localhost.localdomain) ([10.223.84.65]) by fmsmga002.fm.intel.com with ESMTP; 19 Nov 2014 01:42:20 -0800 From: Vinod Koul To: alsa-devel@alsa-project.org Date: Wed, 19 Nov 2014 15:13:26 +0530 Message-Id: <1416390207-11020-1-git-send-email-vinod.koul@intel.com> X-Mailer: git-send-email 1.7.0.4 Cc: Vinod Koul , broonie@kernel.org, lgirdwood@gmail.com Subject: [alsa-devel] [PATCH 1/2] ASoC: Intel: cleanup runtime_pm initialization X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- sound/soc/intel/sst/sst.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/soc/intel/sst/sst.c b/sound/soc/intel/sst/sst.c index b2b5604..9e68a7c 100644 --- a/sound/soc/intel/sst/sst.c +++ b/sound/soc/intel/sst/sst.c @@ -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);