From: Matthias Brugger <matthias.bgg@gmail.com>
To: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Cc: linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] soc: mediatek: mtk-devapc: Switch to devm_clk_get_enabled()
Date: Wed, 1 Feb 2023 14:22:49 +0100 [thread overview]
Message-ID: <136b0d6f-0523-8019-35d9-792211e22d2a@gmail.com> (raw)
In-Reply-To: <20221006110935.59695-1-angelogioacchino.delregno@collabora.com>
On 06/10/2022 13:09, AngeloGioacchino Del Regno wrote:
> This driver does exactly devm_clk_get() and clk_prepare_enable() right
> after, which is exactly what devm_clk_get_enabled() does: clean that
> up by switching to the latter.
>
> This commit brings no functional changes.
>
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Applied, sorry for the delay.
Matthias
> ---
> drivers/soc/mediatek/mtk-devapc.c | 11 ++---------
> 1 file changed, 2 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/soc/mediatek/mtk-devapc.c b/drivers/soc/mediatek/mtk-devapc.c
> index fc13334db1b1..bad139cb117e 100644
> --- a/drivers/soc/mediatek/mtk-devapc.c
> +++ b/drivers/soc/mediatek/mtk-devapc.c
> @@ -276,19 +276,14 @@ static int mtk_devapc_probe(struct platform_device *pdev)
> if (!devapc_irq)
> return -EINVAL;
>
> - ctx->infra_clk = devm_clk_get(&pdev->dev, "devapc-infra-clock");
> + ctx->infra_clk = devm_clk_get_enabled(&pdev->dev, "devapc-infra-clock");
> if (IS_ERR(ctx->infra_clk))
> return -EINVAL;
>
> - if (clk_prepare_enable(ctx->infra_clk))
> - return -EINVAL;
> -
> ret = devm_request_irq(&pdev->dev, devapc_irq, devapc_violation_irq,
> IRQF_TRIGGER_NONE, "devapc", ctx);
> - if (ret) {
> - clk_disable_unprepare(ctx->infra_clk);
> + if (ret)
> return ret;
> - }
>
> platform_set_drvdata(pdev, ctx);
>
> @@ -303,8 +298,6 @@ static int mtk_devapc_remove(struct platform_device *pdev)
>
> stop_devapc(ctx);
>
> - clk_disable_unprepare(ctx->infra_clk);
> -
> return 0;
> }
>
prev parent reply other threads:[~2023-02-01 13:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-06 11:09 AngeloGioacchino Del Regno
2023-02-01 13:22 ` Matthias Brugger [this message]
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=136b0d6f-0523-8019-35d9-792211e22d2a@gmail.com \
--to=matthias.bgg@gmail.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
/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
all inboxes | Powered by JetHome®