clk: rockchip: rk3399: allow insmod to succeed if no DT match

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I9247fcfddedbb6215b254fc3623d75593f9f757f
This commit is contained in:
Tao Huang
2022-12-15 17:20:32 +08:00
parent 57f2a778a0
commit 55a560acd6
+5 -2
View File
@@ -1694,6 +1694,7 @@ static void __init rk3399_pmu_clk_init(struct device_node *np)
}
CLK_OF_DECLARE(rk3399_cru_pmu, "rockchip,rk3399-pmucru", rk3399_pmu_clk_init);
#ifdef MODULE
struct clk_rk3399_inits {
void (*inits)(struct device_node *np);
};
@@ -1718,7 +1719,7 @@ static const struct of_device_id clk_rk3399_match_table[] = {
};
MODULE_DEVICE_TABLE(of, clk_rk3399_match_table);
static int __init clk_rk3399_probe(struct platform_device *pdev)
static int clk_rk3399_probe(struct platform_device *pdev)
{
struct device_node *np = pdev->dev.of_node;
const struct of_device_id *match;
@@ -1736,14 +1737,16 @@ static int __init clk_rk3399_probe(struct platform_device *pdev)
}
static struct platform_driver clk_rk3399_driver = {
.probe = clk_rk3399_probe,
.driver = {
.name = "clk-rk3399",
.of_match_table = clk_rk3399_match_table,
.suppress_bind_attrs = true,
},
};
builtin_platform_driver_probe(clk_rk3399_driver, clk_rk3399_probe);
module_platform_driver(clk_rk3399_driver);
MODULE_DESCRIPTION("Rockchip RK3399 Clock Driver");
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:clk-rk3399");
#endif /* MODULE */