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

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I2625679beff77d3eabe9d50b94d232eca500cfaf
This commit is contained in:
Tao Huang
2022-12-15 14:18:55 +08:00
parent 26daf547e4
commit 190db3b49f

View File

@@ -1097,6 +1097,7 @@ static void __init px30_pmu_clk_init(struct device_node *np)
}
CLK_OF_DECLARE(px30_cru_pmu, "rockchip,px30-pmucru", px30_pmu_clk_init);
#ifdef MODULE
struct clk_px30_inits {
void (*inits)(struct device_node *np);
};
@@ -1121,7 +1122,7 @@ static const struct of_device_id clk_px30_match_table[] = {
};
MODULE_DEVICE_TABLE(of, clk_px30_match_table);
static int __init clk_px30_probe(struct platform_device *pdev)
static int clk_px30_probe(struct platform_device *pdev)
{
struct device_node *np = pdev->dev.of_node;
const struct of_device_id *match;
@@ -1139,12 +1140,14 @@ static int __init clk_px30_probe(struct platform_device *pdev)
}
static struct platform_driver clk_px30_driver = {
.probe = clk_px30_probe,
.driver = {
.name = "clk-px30",
.of_match_table = clk_px30_match_table,
},
};
builtin_platform_driver_probe(clk_px30_driver, clk_px30_probe);
module_platform_driver(clk_px30_driver);
MODULE_DESCRIPTION("Rockchip PX30 Clock Driver");
MODULE_LICENSE("GPL");
#endif /* MODULE */