soc: rockchip: decompress: Probe driver early

By create device early.

Change-Id: Id9071bf5f988958b1604a5066f7b99e67abc0675
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
This commit is contained in:
Tao Huang
2020-06-22 18:20:34 +08:00
parent ab3221eae8
commit a6c9add575

View File

@@ -217,7 +217,7 @@ static irqreturn_t rk_decom_irq_thread(int irq, void *priv)
return IRQ_HANDLED;
}
static int rockchip_decom_probe(struct platform_device *pdev)
static int __init rockchip_decom_probe(struct platform_device *pdev)
{
struct rk_decom *rk_dec;
struct resource *res = NULL;
@@ -314,12 +314,20 @@ static struct platform_driver rk_decom_driver = {
.name = "rockchip_hw_decompress",
.of_match_table = rockchip_decom_dt_match,
},
.probe = rockchip_decom_probe,
};
static int __init rockchip_hw_decompress_init(void)
{
return platform_driver_register(&rk_decom_driver);
struct device_node *node;
node = of_find_matching_node(NULL, rockchip_decom_dt_match);
if (node) {
of_platform_device_create(node, NULL, NULL);
of_node_put(node);
return platform_driver_probe(&rk_decom_driver, rockchip_decom_probe);
}
return 0;
}
pure_initcall(rockchip_hw_decompress_init);