Re: [PATCH v15 35/35] crypto: amlogic: keep the bus clock enabled
From: Markus Elfring
Date: Wed Dec 02 2026 - 10:28:21 EST
…
> +++ b/drivers/crypto/amlogic/amlogic-gxl.h
…
> @@ -113,6 +116,7 @@ struct meson_pdata {
> */
> struct meson_dev {
> void __iomem *base;
> + struct clk *busclk;
> struct device *dev;
> const struct meson_pdata *pdata;
> struct meson_flow *chanlist;
Is it still required to store the clock pointer within the data structure?
https://elixir.bootlin.com/linux/v7.4-rc2/source/drivers/crypto/amlogic/amlogic-gxl.h#L82-L102
…
> +++ b/drivers/crypto/amlogic/amlogic-gxl-core.c
…
> @@ -236,6 +237,13 @@ static int meson_crypto_probe(struct platform_device *pdev)
> if (IS_ERR(mc->base))
> return PTR_ERR(mc->base);
>
> + mc->busclk = devm_clk_get_enabled(&pdev->dev, NULL);
> + if (IS_ERR(mc->busclk)) {
> + err = PTR_ERR(mc->busclk);
> + dev_err(&pdev->dev, "Cannot get/enable core clock err=%d\n", err);
> + return err;
> + }
> +
> err = meson_allocate_chanlist(mc);
…
Would a local variable become sufficient after the proposed source code transformation?
https://elixir.bootlin.com/linux/v7.4-rc2/source/drivers/crypto/amlogic/amlogic-gxl-core.c#L246-L251
Regards,
Markus