From patchwork Wed Nov 11 04:13:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhang Qilong X-Patchwork-Id: 11896183 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29567C388F9 for ; Wed, 11 Nov 2020 04:10:54 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 4E29E20678 for ; Wed, 11 Nov 2020 04:10:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="BKDUaanB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4E29E20678 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 94A91166C; Wed, 11 Nov 2020 05:09:58 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 94A91166C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1605067848; bh=jI0W932WQ2dG637clXeg8elox+Njv6GxPbKYeVkiU9c=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=BKDUaanBLbNUZUYeoFPdEby4iuY/MKY0xdWGp+/DO9NdYxu7eAjz5Z6/xmCDIor1z LvYTa+3EJXZ/y/LIWqlXWfpmS47ObTvT3Z5kb3VXVE0rI4M3W/s5/sUFOlHCALFId8 kylyZcd/7l4Y9sCLMM2R9aiNd01OWyLEz6fbYcCQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 0443CF80059; Wed, 11 Nov 2020 05:09:58 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 269CAF801F5; Wed, 11 Nov 2020 05:09:55 +0100 (CET) Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 2E9CDF801F5 for ; Wed, 11 Nov 2020 05:09:47 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2E9CDF801F5 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4CWB7s6VzBzLwtS; Wed, 11 Nov 2020 12:09:29 +0800 (CST) Received: from huawei.com (10.175.127.227) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Wed, 11 Nov 2020 12:09:38 +0800 From: Zhang Qilong To: , , , Subject: [PATCH 0/3] Fix PM disable depth imbalance on error Date: Wed, 11 Nov 2020 12:13:23 +0800 Message-ID: <20201111041326.1257558-1-zhangqilong3@huawei.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 X-Originating-IP: [10.175.127.227] X-CFilter-Loop: Reflected Cc: patches@opensource.cirrus.com, alsa-devel@alsa-project.org 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 pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed on the error handling path to keep it balanced according to context. This series of patches fixed it. Zhang Qilong (3): ASoC: wm8994: Fix PM disable depth imbalance on error ASoC: wm8997: Fix PM disable depth imbalance on error ASoC: wm8998: Fix PM disable depth imbalance on error sound/soc/codecs/wm8994.c | 6 +++++- sound/soc/codecs/wm8997.c | 9 +++++++-- sound/soc/codecs/wm8998.c | 4 +++- 3 files changed, 15 insertions(+), 4 deletions(-)