[PATCH] clk: starfive: jh7110-pll: Mark the probe function as __init

Changhuang Liang posted 1 patch 3 weeks, 6 days ago
drivers/clk/starfive/clk-starfive-jh7110-pll.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] clk: starfive: jh7110-pll: Mark the probe function as __init
Posted by Changhuang Liang 3 weeks, 6 days ago
Mark the jh7110_pll_probe function as __init.

There's no need to support hotplugging in the jh7110-pll driver. We use
builtin_platform_driver_probe, the probe function will only be called at
startup.

Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
---
 drivers/clk/starfive/clk-starfive-jh7110-pll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/starfive/clk-starfive-jh7110-pll.c b/drivers/clk/starfive/clk-starfive-jh7110-pll.c
index 3598390e8fd0..56dc58a04f8a 100644
--- a/drivers/clk/starfive/clk-starfive-jh7110-pll.c
+++ b/drivers/clk/starfive/clk-starfive-jh7110-pll.c
@@ -453,7 +453,7 @@ static struct clk_hw *jh7110_pll_get(struct of_phandle_args *clkspec, void *data
 	return ERR_PTR(-EINVAL);
 }
 
-static int jh7110_pll_probe(struct platform_device *pdev)
+static int __init jh7110_pll_probe(struct platform_device *pdev)
 {
 	struct jh7110_pll_priv *priv;
 	unsigned int idx;
-- 
2.25.1
Re: [PATCH] clk: starfive: jh7110-pll: Mark the probe function as __init
Posted by Stephen Boyd 3 weeks, 4 days ago
Quoting Changhuang Liang (2024-10-28 20:28:28)
> Mark the jh7110_pll_probe function as __init.
> 
> There's no need to support hotplugging in the jh7110-pll driver. We use
> builtin_platform_driver_probe, the probe function will only be called at
> startup.
> 
> Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
> ---

Applied to clk-next
Re: [PATCH] clk: starfive: jh7110-pll: Mark the probe function as __init
Posted by Emil Renner Berthing 3 weeks, 5 days ago
Changhuang Liang wrote:
> Mark the jh7110_pll_probe function as __init.
>
> There's no need to support hotplugging in the jh7110-pll driver. We use
> builtin_platform_driver_probe, the probe function will only be called at
> startup.
>
> Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>

Makse sense to me, thanks.

Reviewed-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>

> ---
>  drivers/clk/starfive/clk-starfive-jh7110-pll.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/clk/starfive/clk-starfive-jh7110-pll.c b/drivers/clk/starfive/clk-starfive-jh7110-pll.c
> index 3598390e8fd0..56dc58a04f8a 100644
> --- a/drivers/clk/starfive/clk-starfive-jh7110-pll.c
> +++ b/drivers/clk/starfive/clk-starfive-jh7110-pll.c
> @@ -453,7 +453,7 @@ static struct clk_hw *jh7110_pll_get(struct of_phandle_args *clkspec, void *data
>  	return ERR_PTR(-EINVAL);
>  }
>
> -static int jh7110_pll_probe(struct platform_device *pdev)
> +static int __init jh7110_pll_probe(struct platform_device *pdev)
>  {
>  	struct jh7110_pll_priv *priv;
>  	unsigned int idx;
> --
> 2.25.1
>