From patchwork Wed Oct 19 08:28:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 5056 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp247974wrs; Wed, 19 Oct 2022 03:42:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4HE/o2fbsQpuf1lI4GlNkFHaYM70AJC74Nbr0pmuIdyToYmDhcCSsnWMNqolYd13B7SRWq X-Received: by 2002:a17:906:4bd3:b0:731:3bdf:b95c with SMTP id x19-20020a1709064bd300b007313bdfb95cmr6154629ejv.677.1666176140703; Wed, 19 Oct 2022 03:42:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666176140; cv=none; d=google.com; s=arc-20160816; b=pH90D40Lvo7e94I5VcXy5nUW8VWlVGWFOPS/L9eICv6LiuvhJsu8OrlZU+nQZQUNL6 O7nzGontthrQsoxo272q5b/08qdsNYS9UxXTmEQKtjJOzb5XlfXGeu8xf46Mh60HRyUY 5ZsV/T7BLsqM+11DmMkNEzVvS19q3TF4eRDjrez/gSASaWqvvuBmz4q/bIR/4Tj1BZl5 PnGjtoBL/24YBKpvDTFJIiP/Ew0r2Ajky9XaYu3OQND1trpim3/ToKQW/sSFFVBcxMJv 0cZ9aQhru8wp9o4/2lHMke2EsCSepo66c+UMOCRiIIiq08q6bNOhpZaqPm0rV1pRWrui VsxQ== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sc12-20020a1709078a0c00b0077fadd74307si15145892ejc.128.2022.10.19.03.41.56; Wed, 19 Oct 2022 03:42:20 -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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747112312634147857?= X-GMAIL-MSGID: =?utf-8?q?1747112312634147857?= 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); }