From patchwork Tue Apr 26 18:41:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 566136 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F002EC433EF for ; Tue, 26 Apr 2022 18:43:13 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 3F95217C6; Tue, 26 Apr 2022 20:42:22 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3F95217C6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1650998592; bh=De2EiuLXwcaEq+Iv5rmHiTmFuHEwNKxBjosg0uobJTw=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=dSoASv1jImp94+HU+IViyXadljiAWeiZqHK1gi+Cqq7BdcW51Qj8/8b2zWB7DS0ko syJ2l3XblVSfzk90DHNvquvE/i/3xPcMpznxcr4EOzW5VPhF/Br6ec15pMGolw/UeZ vMy+wJzObULz6vff1LBtFXuXECsD/4UvIphQkcRU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 856A1F80508; Tue, 26 Apr 2022 20:41:31 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id EB339F80510; Tue, 26 Apr 2022 20:41:27 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id F37CBF8014B for ; Tue, 26 Apr 2022 20:41:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz F37CBF8014B Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ccKsSz25" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650998482; x=1682534482; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=De2EiuLXwcaEq+Iv5rmHiTmFuHEwNKxBjosg0uobJTw=; b=ccKsSz25LIdZVi4TssNU/ew8h4O5crfAGz7D81iSAocX1tAPi3sTqu6A ki7nFtBAx4PGQi18nIGxeuh0GIyL8fFJOGRZef0qMV2XVWq57GBdsMQos 8fIJYhzIhixa4NPrctvHlXwqBANmqDB/BvJjEO8s/GreIhnXhNJ7GyQHy KSDreXX2Bk+/BTOvhT532D2k8AM8pVUbgD0XH/51tHGeAwH+HUhUGs2Jd wUP1C1z2qJyzfw6zG0hUCgZpYgXq6/halQxmBc7W04GBYuT5K2N/g6hQD FDOMsa7E14oBzu5zG8bq3nXMy3Cvc4QAz1apBze9fp6xymAJiJ2GFHQAn w==; X-IronPort-AV: E=McAfee;i="6400,9594,10329"; a="326176832" X-IronPort-AV: E=Sophos;i="5.90,291,1643702400"; d="scan'208";a="326176832" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Apr 2022 11:41:17 -0700 X-IronPort-AV: E=Sophos;i="5.90,291,1643702400"; d="scan'208";a="513300138" Received: from jzhang96-mobl.amr.corp.intel.com (HELO pbossart-mobl3.amr.corp.intel.com) ([10.212.151.202]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Apr 2022 11:41:16 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 2/4] ASoC: SOF: debug: use pm_runtime_resume_and_get() Date: Tue, 26 Apr 2022 13:41:04 -0500 Message-Id: <20220426184106.102636-3-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220426184106.102636-1-pierre-louis.bossart@linux.intel.com> References: <20220426184106.102636-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, Bard Liao , broonie@kernel.org, =?utf-8?q?P=C3=A9ter_Ujfalusi?= , Pierre-Louis Bossart X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Use pm_runtime_resume_and_get() to replace the pm_runtime_get_sync() and pm_runtime_put_noidle() pattern. No functional changes. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Bard Liao --- sound/soc/sof/debug.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/sof/debug.c b/sound/soc/sof/debug.c index b59619ecfacfc..54d3643b46adb 100644 --- a/sound/soc/sof/debug.c +++ b/sound/soc/sof/debug.c @@ -229,9 +229,8 @@ static int memory_info_update(struct snd_sof_dev *sdev, char *buf, size_t buff_s if (!reply) return -ENOMEM; - ret = pm_runtime_get_sync(sdev->dev); + ret = pm_runtime_resume_and_get(sdev->dev); if (ret < 0 && ret != -EACCES) { - pm_runtime_put_noidle(sdev->dev); dev_err(sdev->dev, "error: enabling device failed: %d\n", ret); goto error; }