Skip to content

Commit 2e7b3da

Browse files
sremmind
authored andcommitted
clk: rockchip: rk3588: drop unused code
All clocks are registered early using CLK_OF_DECLARE(), which marks the DT node as processed. For the processed DT node the probe routine is never called. Thus this whole code is never executed. This could be "fixed" by using CLK_OF_DECLARE_DRIVER, which avoids marking the DT node as processed. But then the probe routine would re-register all the clocks by calling rk3588_clk_init() again. Signed-off-by: Sebastian Reichel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Heiko Stuebner <[email protected]>
1 parent cc40f5b commit 2e7b3da

File tree

1 file changed

+0
-40
lines changed

1 file changed

+0
-40
lines changed

drivers/clk/rockchip/clk-rk3588.c

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -2502,43 +2502,3 @@ static void __init rk3588_clk_init(struct device_node *np)
25022502
}
25032503

25042504
CLK_OF_DECLARE(rk3588_cru, "rockchip,rk3588-cru", rk3588_clk_init);
2505-
2506-
struct clk_rk3588_inits {
2507-
void (*inits)(struct device_node *np);
2508-
};
2509-
2510-
static const struct clk_rk3588_inits clk_3588_cru_init = {
2511-
.inits = rk3588_clk_init,
2512-
};
2513-
2514-
static const struct of_device_id clk_rk3588_match_table[] = {
2515-
{
2516-
.compatible = "rockchip,rk3588-cru",
2517-
.data = &clk_3588_cru_init,
2518-
},
2519-
{ }
2520-
};
2521-
2522-
static int __init clk_rk3588_probe(struct platform_device *pdev)
2523-
{
2524-
const struct clk_rk3588_inits *init_data;
2525-
struct device *dev = &pdev->dev;
2526-
2527-
init_data = device_get_match_data(dev);
2528-
if (!init_data)
2529-
return -EINVAL;
2530-
2531-
if (init_data->inits)
2532-
init_data->inits(dev->of_node);
2533-
2534-
return 0;
2535-
}
2536-
2537-
static struct platform_driver clk_rk3588_driver = {
2538-
.driver = {
2539-
.name = "clk-rk3588",
2540-
.of_match_table = clk_rk3588_match_table,
2541-
.suppress_bind_attrs = true,
2542-
},
2543-
};
2544-
builtin_platform_driver_probe(clk_rk3588_driver, clk_rk3588_probe);

0 commit comments

Comments
 (0)