The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Fabio Estevam <festevam@gmail.com>,
	mfd@lists.linux.dev, imx@lists.linux.dev,
	Lee Jones <lee@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	kernel-janitors@vger.kernel.org,
	Andy Shevchenko <andy@kernel.org>,
	Christophe Jaillet <christophe.jaillet@wanadoo.fr>,
	Frank Li <Frank.Li@nxp.com>, Jonathan Cameron <jic23@kernel.org>,
	Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>,
	Julia Lawall <julia.lawall@inria.fr>
Subject: Re: [PATCH v6 2/2] mfd: mxs-lradc: Convert to devm_clk_get_enabled()
Date: Sat, 28 Nov 2026 13:13:36 +0100	[thread overview]
Message-ID: <544e43ea-28ae-46bd-8c1d-e015a372d6eb@web.de> (raw)
In-Reply-To: <20261127180709.315826-2-festevam@gmail.com>

…
> This conversion makes the code simpler.
…
> +++ b/drivers/mfd/mxs-lradc.c
> @@ -160,17 +160,10 @@ static int mxs_lradc_probe(struct platform_device *pdev)
>  	if (IS_ERR(lradc->base))
>  		return PTR_ERR(lradc->base);
>  
> -	lradc->clk = devm_clk_get(&pdev->dev, NULL);
> -	if (IS_ERR(lradc->clk)) {
> -		dev_err(dev, "Failed to get the delay unit clock\n");
> -		return PTR_ERR(lradc->clk);
> -	}
> -
> -	ret = clk_prepare_enable(lradc->clk);
> -	if (ret) {
> -		dev_err(dev, "Failed to enable the delay unit clock\n");
> -		return ret;
> -	}
> +	lradc->clk = devm_clk_get_enabled(dev, NULL);
…

How do you think about to use the local variable “dev” in the implementation of
the function “mxs_lradc_probe” consistently?
Is there a need to adjust further source code places?
https://elixir.bootlin.com/linux/v7.4-rc2/source/drivers/mfd/mxs-lradc.c#L126-L231

Regards,
Markus

       reply	other threads:[~2026-11-28 12:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20261127180709.315826-2-festevam@gmail.com>
2026-11-28 12:13 ` Markus Elfring [this message]
2026-11-28 12:48 ` [PATCH v6 2/2] mfd: mxs-lradc: Convert to devm_clk_get_enabled() Markus Elfring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=544e43ea-28ae-46bd-8c1d-e015a372d6eb@web.de \
    --to=markus.elfring@web.de \
    --cc=Frank.Li@nxp.com \
    --cc=andy@kernel.org \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=festevam@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=jic23@kernel.org \
    --cc=jonathan.cameron@oss.qualcomm.com \
    --cc=julia.lawall@inria.fr \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mfd@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox