Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp878411rwi; Wed, 19 Oct 2022 04:13:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6bbJCxxIfQVYEp3Tm4qKeHXIqEuDZOTT1uB1CbXbQSR9QrrgkPBucZ9vEiHgaerZ3ZmmTE X-Received: by 2002:a62:174a:0:b0:563:69ac:562f with SMTP id 71-20020a62174a000000b0056369ac562fmr8092351pfx.68.1666178010190; Wed, 19 Oct 2022 04:13:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666178010; cv=none; d=google.com; s=arc-20160816; b=CQiy0w+2bz+3fIMx7DmxuYwwzTbXX5Om3CHgSKZoOjGa42ZRL9IRWzhFMz0jOK6Oe3 0hhmAvmA5Oy0y36wYSRjbagKJmcV18fYdv5dTSXyWqnwEaMoZcUy0aTXH9v/yPTUZfxC xA34Y3cjssWrp7SEC4Cte+MoVJhyjpqikiDRbsaEmd/znrLC75zs+pKvaVpuZSiBhlSo 5pBnrsefwI3FCfPcIb5jROfWC8Mb/xUiP7z7YRMaqhYEiutFXn3iPjyZPrvKMLcIQWeL Hgju8P68A1xWlxyvLsLPRpeeNqVFGk4DtCr/V83NhLn8LWi36dETcTWjleVwvT1I/o7e dktQ== 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=tH5GmHApAvRchikH6lu7ImE58Vw5jDglsZ5aZ7flZOU=; b=dW+r+mCS2a2qPIqgxW5z0MdrpH4VypZjEk09uYoyllKWZ0p0z3X23U5GrEPMrvi/Zt 6thV6mtzgTe7B7SXZsoMaEuvwlFZgtMBjJ7RSG/zJtJyOfTrlU3o5DCr4FU2RNlreRkf K+cNjU/+hyAPbdEeSzE783LBCJBdMFLRWyUan6fHwte6iEzsGxYECtFnM0Vw4S+4kTGd El+63w6pPSJ6kLqls+3IiEYdfzgqvDo6R0lYM8Re2htRStDYmcq5kC22OG393XdcCVV8 TnmzGPaxKP99RtHkLRqKif1gfvB/agzqsExgV9fo+nkS2+BPJOAm56fl6a/MVdUqB2TH Q3Rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wA8m9s7b; 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 j65-20020a638b44000000b0046b2ebb0a4esi15525353pge.212.2022.10.19.04.13.18; Wed, 19 Oct 2022 04:13:30 -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=wA8m9s7b; 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 S232355AbiJSKlX (ORCPT + 99 others); Wed, 19 Oct 2022 06:41:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232147AbiJSKkQ (ORCPT ); Wed, 19 Oct 2022 06:40:16 -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 534F810DE5C; Wed, 19 Oct 2022 03:19:02 -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 18F9A61876; Wed, 19 Oct 2022 08:58:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2E25AC433D6; Wed, 19 Oct 2022 08:58:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169887; bh=S2q4dLCv0wB5dsVQ0gf1Cc97ul+nQ3BJKl3LWuEVW5U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wA8m9s7bCpfD9BEafwlW+aQSR7q0VQ1g6YOmUDDw7TLmktn5PGOGPbGQ0IRnSl1Vu P/9GrMmvS20d0jgSkndbLfMbPfwu9Vjhra6Ds2QDt5zo9L7cfu1S5oMl9y5dp+r5Tc QmDCKPkRxMM66wyRho4UzDTutwNCtLfs5Ds64GFo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Judy Hsiao , Mark Brown , Sasha Levin Subject: [PATCH 6.0 413/862] ASoC: rockchip: i2s: use regmap_read_poll_timeout_atomic to poll I2S_CLR Date: Wed, 19 Oct 2022 10:28:20 +0200 Message-Id: <20221019083308.208444995@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.4 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: Judy Hsiao [ Upstream commit f0c8d7468af0001b80b0c86802ee28063f800987 ] 1. Uses regmap_read_poll_timeout_atomic to poll I2S_CLR as it is called within a spin lock. 2. Fixes the typo of break condition in regmap_read_poll_timeout_atomic. Fixes: fbb0ec656ee5 ("ASoC: rockchip: i2s: use regmap_read_poll_timeout to poll I2S_CLR") Signed-off-by: Judy Hsiao Link: https://lore.kernel.org/r/20220930151546.2017667-1-judyhsiao@chromium.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/rockchip/rockchip_i2s.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/sound/soc/rockchip/rockchip_i2s.c b/sound/soc/rockchip/rockchip_i2s.c index 28c86f5e435e..a8758ad68442 100644 --- a/sound/soc/rockchip/rockchip_i2s.c +++ b/sound/soc/rockchip/rockchip_i2s.c @@ -162,12 +162,12 @@ static int rockchip_snd_txctrl(struct rk_i2s_dev *i2s, int on) I2S_CLR_TXC | I2S_CLR_RXC); if (ret < 0) goto end; - ret = regmap_read_poll_timeout(i2s->regmap, - I2S_CLR, - val, - val != 0, - 20, - 200); + ret = regmap_read_poll_timeout_atomic(i2s->regmap, + I2S_CLR, + val, + val == 0, + 20, + 200); if (ret < 0) dev_warn(i2s->dev, "fail to clear: %d\n", ret); } @@ -220,12 +220,12 @@ static int rockchip_snd_rxctrl(struct rk_i2s_dev *i2s, int on) I2S_CLR_TXC | I2S_CLR_RXC); if (ret < 0) goto end; - ret = regmap_read_poll_timeout(i2s->regmap, - I2S_CLR, - val, - val != 0, - 20, - 200); + ret = regmap_read_poll_timeout_atomic(i2s->regmap, + I2S_CLR, + val, + val == 0, + 20, + 200); if (ret < 0) dev_warn(i2s->dev, "fail to clear: %d\n", ret); } -- 2.35.1