Skip to contentSkip to conversation

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

PATCH Applied Changhuang Liang 3 participants 3 messages Oct 29, 2024 – Oct 30, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: starfive: jh7110-pll: Mark the probe function as __init

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.

---
 drivers/clk/starfive/clk-starfive-jh7110-pll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/starfive/clk-starfive-jh7110-pll.c +1 -1
index 3598390e8fd0..56dc58a04f8a 100644
@@ -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;
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Changhuang Liang

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.

Makse sense to me, thanks.

Quoted 20 lines
---
 drivers/clk/starfive/clk-starfive-jh7110-pll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/starfive/clk-starfive-jh7110-pll.c +1 -2
index 3598390e8fd0..56dc58a04f8a 100644
@@ -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