From patchwork Thu Jun 16 22:04:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 582241 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 70BA6C433EF for ; Thu, 16 Jun 2022 22:08:03 +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 962101B08; Fri, 17 Jun 2022 00:07:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 962101B08 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1655417281; bh=96P6uvGDTDGFtAFSYZWWSlbmSlPk/R9jOmty2SHjkCU=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=UW7p5B2csyqDL8zHcfwVOKPhr52HJa0GKAi5T7zpG9X2vsq5gFv77bdHrOQ4SJkHD ii+RpLqa9lT/JmihZ+kDkLoHL4KuV0mM8MUTnmKVJItAhv5NOOVrRk6F5ttfSmDEf9 gEckz3IsLG+aGvrzRDbUwIYt3kFpmmcsE6b6BwQc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id EAD7AF80558; Fri, 17 Jun 2022 00:04:59 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id BDA07F80543; Fri, 17 Jun 2022 00:04:55 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (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 B71B7F8053A for ; Fri, 17 Jun 2022 00:04:52 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B71B7F8053A Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="LiSaGJVm" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655417093; x=1686953093; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=96P6uvGDTDGFtAFSYZWWSlbmSlPk/R9jOmty2SHjkCU=; b=LiSaGJVmtW6QU10TajeCmDTZKpgIev1zYz8EU7fZ8Uf7TJr9UAm3g86r 6fcG8PTKpWIQ/h9A9fKhkU3R1X0hqclpzT6+hNJx9nuz3OHHGxJGbo1aj oKPXbesGchv4dz0rb+Kd6XKwHv7K6VbqD//S12eBf1Cqm75AtSlLJq4UL ZoeriQRahWTEsrJB7u/HoLE0wZVeCUUnL9sCwFdZvLwFcR/Bm3yxqWQ9V WsgJCX8RfcV1NOHRqbxl6nnNTn1Q5gWK8yqCtd+5Py90+4Bnlu3bxX/C+ ttkRCyT4ozkB0nBuifRbvSeNEvOY5YVYv1ajHhNHuceffmPdrnWFBYxzM g==; X-IronPort-AV: E=McAfee;i="6400,9594,10380"; a="304810975" X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="304810975" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jun 2022 15:04:52 -0700 X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="728085035" Received: from buckkenx-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.212.52.70]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jun 2022 15:04:51 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 10/11] ASoC: tas2552: use pm_runtime_resume_and_get() Date: Thu, 16 Jun 2022 17:04:26 -0500 Message-Id: <20220616220427.136036-11-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220616220427.136036-1-pierre-louis.bossart@linux.intel.com> References: <20220616220427.136036-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: Cezary Rojewski , Stephen Kitt , Kai Vehmanen , Liam Girdwood , tiwai@suse.de, open list , Takashi Iwai , Pierre-Louis Bossart , Ranjani Sridharan , broonie@kernel.org, =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= , Bard Liao 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" The use of pm_runtime_get_sync() is buggy with no use of put_noidle() on error. Use pm_runtime_resume_and_get() instead. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Kai Vehmanen Reviewed-by: Ranjani Sridharan --- sound/soc/codecs/tas2552.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/tas2552.c b/sound/soc/codecs/tas2552.c index c98a9332dcc0e..da744cfae611c 100644 --- a/sound/soc/codecs/tas2552.c +++ b/sound/soc/codecs/tas2552.c @@ -581,7 +581,7 @@ static int tas2552_component_probe(struct snd_soc_component *component) gpiod_set_value(tas2552->enable_gpio, 1); - ret = pm_runtime_get_sync(component->dev); + ret = pm_runtime_resume_and_get(component->dev); if (ret < 0) { dev_err(component->dev, "Enabling device failed: %d\n", ret);