Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4450743imw; Tue, 19 Jul 2022 06:54:17 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s6IpHfxfl9DIExcy34+0YpuNWrgMiZ2KJ7A1O76xFt/rauvlD5AFGC0DX+oEtwNGTn4GoZ X-Received: by 2002:a05:6402:348c:b0:43a:915f:d403 with SMTP id v12-20020a056402348c00b0043a915fd403mr43333722edc.326.1658238857244; Tue, 19 Jul 2022 06:54:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658238857; cv=none; d=google.com; s=arc-20160816; b=UJVx+sTBAYpqHCPqdXKZmhVCAFTMAiWI40pyTnMs1zUJr8NtJp4jXnTw7n0QfzWy5w 6IPmrGt0dj4axCdHaT3qhiwC02XfftbuAHnLtmnWNAuEuM8vC1Uq9c2+SPlwl18vqJsk ECvhYIw8woiKd0+E1HpQlTdLzcz4Djp6X1+A4y+utOVeqA9+cSlB2Dq8AY0miUMKEqwI mxChe0J82OckdWvbKFZYdIkz9jy69cdCEAIbO3XBprYN7SM3PNNbmq408BtO+ETJQ55j ZPS/aaNkVMGCllf0Dxq5oInkoA3jUtPSvTNnzXe74G6QWOuapjENSee7kqh7ZW3Gfrc3 fHpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=SIuvaz+swSXxGJvptNwuXUERCr4sVw3RMlxx3rVeXXA=; b=J0CD58XVyAyb3K/3MyE1IlR3Mb7BXQ2SV3fcctfxcedbvV7tpUuIMrK5GMCetXPUeD IP7Zn2N84lDmy5pbjvsiASSthdC/4Ruvr3HuFJP4EFENTFFp8YNH9Lt7nqpVaVqJ3tBF mc1ShfvVI3PzQKFeLrEFgXvR2to6eaIn7xztr4++vaidZsF2W5xfLvLTyowvhnMMOO1L 9B77lH2jETE8OA0WmZpoBJYnKHPWakkLqBvY54373xqSmnVL11pcANkHh5lIbEEl4ZY6 qrJJmHWt67ywczt7Io2GQK1nXpuDPuVMCXk2uw3W8gUKvQPa2DdEZtMZh6HdfaCc7d1z QstA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HWIoM2Rj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dk17-20020a0564021d9100b0043a5295ac89si10848515edb.80.2022.07.19.06.53.52; Tue, 19 Jul 2022 06:54:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HWIoM2Rj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241491AbiGSMnX (ORCPT + 99 others); Tue, 19 Jul 2022 08:43:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241482AbiGSMnC (ORCPT ); Tue, 19 Jul 2022 08:43:02 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4EFF80501; Tue, 19 Jul 2022 05:16:39 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3469D6182F; Tue, 19 Jul 2022 12:16:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 17B5EC341C6; Tue, 19 Jul 2022 12:16:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658232993; bh=1mtxs395ZlU+Q1Yog4IOyC9wgbTJnqJ3X7rz6XpMosY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HWIoM2RjeHV4y2y7kT8wpEOzxdG30ug2o4pkxkbmiTALsQ01nZ73hzbBg3Y39OKUL hGNrCwLy8iEwXBWZ9xR/1NMGKLxpQNUoVskGhYex15B+FOOzyVkpODFfIsiLCBrJuO E8JySEGi6pND9b9bJKl0rvCshiBhVQ1WTx/mYdOs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pierre-Louis Bossart , Rander Wang , Bard Liao , Mark Brown , Sasha Levin Subject: [PATCH 5.15 136/167] ASoC: rt711: fix calibrate mutex initialization Date: Tue, 19 Jul 2022 13:54:28 +0200 Message-Id: <20220719114709.689028379@linuxfoundation.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220719114656.750574879@linuxfoundation.org> References: <20220719114656.750574879@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pierre-Louis Bossart [ Upstream commit 08bb5dc6ce02374169213cea772b1c297eaf32d5 ] Follow the same flow as rt711-sdca and initialize all mutexes at probe time. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220606203752.144159-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/rt711-sdw.c | 3 +++ sound/soc/codecs/rt711.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) --- a/sound/soc/codecs/rt711-sdw.c +++ b/sound/soc/codecs/rt711-sdw.c @@ -474,6 +474,9 @@ static int rt711_sdw_remove(struct sdw_s if (rt711->first_hw_init) pm_runtime_disable(&slave->dev); + mutex_destroy(&rt711->calibrate_mutex); + mutex_destroy(&rt711->disable_irq_lock); + return 0; } --- a/sound/soc/codecs/rt711.c +++ b/sound/soc/codecs/rt711.c @@ -1199,6 +1199,7 @@ int rt711_init(struct device *dev, struc rt711->sdw_regmap = sdw_regmap; rt711->regmap = regmap; + mutex_init(&rt711->calibrate_mutex); mutex_init(&rt711->disable_irq_lock); /* @@ -1313,7 +1314,6 @@ int rt711_io_init(struct device *dev, st rt711_jack_detect_handler); INIT_DELAYED_WORK(&rt711->jack_btn_check_work, rt711_btn_check_handler); - mutex_init(&rt711->calibrate_mutex); INIT_WORK(&rt711->calibration_work, rt711_calibration_work); schedule_work(&rt711->calibration_work); }