Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2399734lqp; Sun, 24 Mar 2024 17:52:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUJbmj5f0o4X6XmUrytfdHVBPW9xBfAd74SegYkRMuxARMnFGd5QECu8Y5xY749u83jBJuOGOerC7tOZ1uW95IYUfZwfxm7E9XhbRG7WA== X-Google-Smtp-Source: AGHT+IGbCDnJeU6TFRz7VFPKnwSnSs0ZzBmC0vPVsPsPd/H3WLLgw7kzbNxL5tf32DipUKFN1oR3 X-Received: by 2002:a17:902:f789:b0:1e0:b25b:c421 with SMTP id q9-20020a170902f78900b001e0b25bc421mr3961452pln.65.1711327942372; Sun, 24 Mar 2024 17:52:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711327942; cv=pass; d=google.com; s=arc-20160816; b=ht3eY47kX4DJ0VxHFfgl3VsPMboVvtS0nDe1su9yFXOZ+DA6gvIZKlA0SnG2UtQXGu h+uZZgZeBkUyi7MkuA8W1B4iHM37GvCLT6IqkIUN3XPtkHyUNxlow8uWJodWHboBnY+u zLkzKI9Vgc7piKEECkAp0CThEa+ArY7nr7NU/NB/p7btmq4odDa54spbHzPqKWTlxoaA gscDSEStRvY09RjrAMuCxkEvn0G3j1nKk9yshyKUHwmP1nKmguSPTzvUdvxfD+UifMhB dGRvGNDWi3bZ3YY9Q6jjZaPWzLxE4DE511lPv2nY6zwMAdk1gvPMiTJN1mdmBBhqGDzh sOng== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=7Y1ACvdqh5u7gRUxj1I0OfaVTnUx+ErLCVS/swIudI0=; fh=k0YGrrLibE4Ez6fKBTWZNvBxelP2UNQexSeTLOSofmw=; b=OJ2+/z/jie3qi5zzzYNKeOTaIDIUHRTde6XGl4aT30XnsUTcmO8eSbwlFD/sdfiTfC gjX5XS2K8RSpE4GMZocpvg36pU2LChmm79mRqCwJ0oeGUwNe+hawFG2fBzQBv7d/3LT7 YDWSd0gzYymSOOnWkntbWh16tQPEYsZXvMjLm7xpET3oUQF2a7cK5+CBX8M9GM5ATN6o mpyPOo4Sta+rwDFbidD6P9jx2FME22PG/P2jRpE3wocKL64zszd/pfPps/3AIH7yOPtf +H3lanQ8O73c3LH7zu7UNDRVBIkuR0+OPuGyW+OPxdrSuUR4TcILeYqeuEx3nZck79Hl 5zlA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=swo+4aYD; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113431-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113431-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id q7-20020a170902a3c700b001e0bee74c2fsi813180plb.68.2024.03.24.17.52.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 17:52:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113431-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=swo+4aYD; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113431-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113431-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 8F81CB25EFC for ; Mon, 25 Mar 2024 00:34:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EFE231AA91B; Sun, 24 Mar 2024 22:43:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="swo+4aYD" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E53BD1A9F62; Sun, 24 Mar 2024 22:43:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320234; cv=none; b=sES4ItzxDYboM08f3EEjxz3v3QyqHQ05Ck+6oULSFNtXui/t+Mb0hOFfvRnJQ1E5rkbwLCFTT6YEWdFpRFGsoZjCI3ibvHhcv0URRBGc+8i3HEUVFuMk0GCcTh1x8+gtOPymBzrmhDcGqJnlCAPaboGqmJ6xyKtRzZanZ7TtcOk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320234; c=relaxed/simple; bh=gx3Zgui+X5nZudRDwhDa37NzmbxqEjukZjEG0baygKc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WZZAt5ec/32lufNtyrFKABjyoIew0pfJsuWIcAnaegEv0Kx8DHFzFYfz6Jm7shO8xNyBkbX8GBywCTpaL45iSiGWTYSvLrie0Htc2PrTWjtPhKUeps4Ecs0nj2m9h/bjpFR6ZY7Ls5fDnXsodo7Ms2qhzLvk0GEql/fjWquFR+s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=swo+4aYD; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 356AEC43390; Sun, 24 Mar 2024 22:43:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320233; bh=gx3Zgui+X5nZudRDwhDa37NzmbxqEjukZjEG0baygKc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=swo+4aYDj0iJnsl4evXwfz2mX3DudRejmBpa9pN9kfJ2RtpaW3QEmbsWOkswBHewv GBsFYHW3zoMw+C5GEvw71lHsWzsHkc7ZKqJYz0wtrjzLgCxZYaC3lfC+WdxE/Muihz XLKLxqjB8P76KiIpRSMbZ8gsRaonOT1vKg49DllB/LDepd0TzRWYKAODeAuE+Eb/LG Z9dcSTaNisouGcxq7MuYqLbLdkq6vDmju3Zg0Iqy4e3B62X9PRwSL1VY1dj+CmGxco 0fFk0xc9w1UC1PCVuKIopdnnigJEtmJ0fvkALvSkeQWjwEbq85RR2dRKunbM49oVKc qQWYLpHyxFa8w== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Gergo Koteles , Takashi Iwai , Sasha Levin Subject: [PATCH 6.8 540/715] ALSA: hda/tas2781: add lock to system_suspend Date: Sun, 24 Mar 2024 18:31:59 -0400 Message-ID: <20240324223455.1342824-541-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Gergo Koteles [ Upstream commit c58e6ed55a1bb9811d6d936d001b068bb0419467 ] Add the missing lock around tasdevice_tuning_switch(). Fixes: 5be27f1e3ec9 ("ALSA: hda/tas2781: Add tas2781 HDA driver") Signed-off-by: Gergo Koteles Signed-off-by: Takashi Iwai Message-ID: Signed-off-by: Sasha Levin --- sound/pci/hda/tas2781_hda_i2c.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c index ee3e0afc9b313..750e49fbb91e5 100644 --- a/sound/pci/hda/tas2781_hda_i2c.c +++ b/sound/pci/hda/tas2781_hda_i2c.c @@ -885,9 +885,13 @@ static int tas2781_system_suspend(struct device *dev) if (ret) return ret; + mutex_lock(&tas_hda->priv->codec_lock); + /* Shutdown chip before system suspend */ tasdevice_tuning_switch(tas_hda->priv, 1); + mutex_unlock(&tas_hda->priv->codec_lock); + /* * Reset GPIO may be shared, so cannot reset here. * However beyond this point, amps may be powered down. -- 2.43.0