Message ID | 3219effee5c7f190530bdb1ef8ec35cb142e3611.1684594433.git.christophe.jaillet@wanadoo.fr |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp420047vqo; Sat, 20 May 2023 08:17:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6ZioN3R45BLMEBln5eeiCUVuSDOJwo9jEUVhrZ+0e9SQdYXSqYRtaEWjMjmATTvN4y3ffD X-Received: by 2002:a05:6a21:6811:b0:e9:5b0a:deff with SMTP id wr17-20020a056a21681100b000e95b0adeffmr5122974pzb.22.1684595848946; Sat, 20 May 2023 08:17:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684595848; cv=none; d=google.com; s=arc-20160816; b=CfboIB2qwz+A1YVkdBVg5Qq6ev3xsl7xFZf+3sZyYdzIW645MkdknZEc2FSS6DO9wM iBCGYy+7mOmc/hNPQJMwuL7xfQwGbCVTs2BfkdwtG+tBXcV06xZr+rZRDmUbjFOkbwZw VWdD7neHZvPPl80Yvjgqo5pOBtQS4WJj4tajWF+zcyqCcfvQY0Hw4dIj82PiXQwKm6sD q7rEBPhUEDZJXirUZGET2nn7czxCA4zbVpoE0+uaF6iBJgUqS7/8hrZbzhh5b06paulZ 8NHLQxbVzL7Mczp6pnhRjJrTXI4FIUxMvLpXlTDh7ef+hrOYhXP84ByNk7p/uUwFiVD2 EwkQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=4Jkf7tHnTYvxjLJZ8lnVCybLulN7KeUyeXRkBsmgzrk=; b=Z2DcwIFrZS4JkyrNdGLytn2zAMpTOpDg/3eQzQg8gGqrU15NnVb1KRQcHfHYJFBSd8 CAaeicXSlVysgpFc3u8hQLkSnW7ammMHbap+YZrrusi9DoyjyIrUglNtkQXyOQqPlFkC Kfh8LikLt4Dk+V1M+GT6Af/6b1DRA+UauwAjKn/ac2TTjTUofy3TO/Yufqbom8OZAs3d tSTdC5hGws022fD17hF2qNRBI4qVNu6rSHYi9N2snRJyQsMi0rXWY20Qvhb9Zlmf1Zbo rRFPaPC4SuWblyyUXqFeIz99r2G7goWM8hUCH4yTHf5PysEMVFRyp+0Y3BAx2mON0c9I b8eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=CQsi4hW5; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m129-20020a633f87000000b0053084a794f0si1701258pga.290.2023.05.20.08.17.14; Sat, 20 May 2023 08:17:28 -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=@wanadoo.fr header.s=t20230301 header.b=CQsi4hW5; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231318AbjETOyO (ORCPT <rfc822;wlfightup@gmail.com> + 99 others); Sat, 20 May 2023 10:54:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229464AbjETOyM (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 20 May 2023 10:54:12 -0400 Received: from smtp.smtpout.orange.fr (smtp-27.smtpout.orange.fr [80.12.242.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDF38115 for <linux-kernel@vger.kernel.org>; Sat, 20 May 2023 07:54:11 -0700 (PDT) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id 0NyCq5nVtRkO40NyCqQaRc; Sat, 20 May 2023 16:54:10 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1684594450; bh=4Jkf7tHnTYvxjLJZ8lnVCybLulN7KeUyeXRkBsmgzrk=; h=From:To:Cc:Subject:Date; b=CQsi4hW5hW8Fi6yChUdbDdgH8S3NNSLxiKVNSkKVHPjl1VoDPJ3kAezwkUamXg7xr pkaR5tD7fPeTqTejMYZzMX/7m8DJVFCGqyaQCSqeYsgzI82E7SRHweAZ20iyS7w2dH nYO2sdq/e4yK91+N5su1cuC89GaajG3e/UWjY546vTZUA87XOsZyzuKD3fd9UgNNrR x5pGqWAH12CrIanHxxFo6dKPWxXeEUF14DEQfLngxmh3Sh0JzwQdjN+jIuqwQE7Wjq VlI5LLoNDS2sXTny/zYkgNBE6yxnY8ro3IQhCR43HUtxCpYSQ5w3gs4LPtEx7k4TfH 8qQDCVAbS+96w== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sat, 20 May 2023 16:54:10 +0200 X-ME-IP: 86.243.2.178 From: Christophe JAILLET <christophe.jaillet@wanadoo.fr> To: James Schulman <james.schulman@cirrus.com>, David Rhodes <david.rhodes@cirrus.com>, Richard Fitzgerald <rf@opensource.cirrus.com>, Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com> Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET <christophe.jaillet@wanadoo.fr>, alsa-devel@alsa-project.org, patches@opensource.cirrus.com Subject: [PATCH] ASoC: cs53l30: Use the devm_clk_get_optional() helper Date: Sat, 20 May 2023 16:54:06 +0200 Message-Id: <3219effee5c7f190530bdb1ef8ec35cb142e3611.1684594433.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766426776683611341?= X-GMAIL-MSGID: =?utf-8?q?1766426776683611341?= |
Series |
ASoC: cs53l30: Use the devm_clk_get_optional() helper
|
|
Commit Message
Christophe JAILLET
May 20, 2023, 2:54 p.m. UTC
Use devm_clk_get_optional() instead of hand writing it.
This saves some LoC and improves the semantic.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
sound/soc/codecs/cs53l30.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
Comments
On Sat, 20 May 2023 16:54:06 +0200, Christophe JAILLET wrote: > Use devm_clk_get_optional() instead of hand writing it. > This saves some LoC and improves the semantic. > > Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Thanks! [1/1] ASoC: cs53l30: Use the devm_clk_get_optional() helper commit: 0b855cbbd769940fcaf49b2371a05235d8499d5d All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark
diff --git a/sound/soc/codecs/cs53l30.c b/sound/soc/codecs/cs53l30.c index 51ca66e7b3ea..21962b828ab1 100644 --- a/sound/soc/codecs/cs53l30.c +++ b/sound/soc/codecs/cs53l30.c @@ -990,14 +990,10 @@ static int cs53l30_i2c_probe(struct i2c_client *client) } /* Check if MCLK provided */ - cs53l30->mclk = devm_clk_get(dev, "mclk"); + cs53l30->mclk = devm_clk_get_optional(dev, "mclk"); if (IS_ERR(cs53l30->mclk)) { - if (PTR_ERR(cs53l30->mclk) != -ENOENT) { - ret = PTR_ERR(cs53l30->mclk); - goto error; - } - /* Otherwise mark the mclk pointer to NULL */ - cs53l30->mclk = NULL; + ret = PTR_ERR(cs53l30->mclk); + goto error; } /* Fetch the MUTE control */