diff --git a/drivers/soc/rockchip/rockchip_pvtm.c b/drivers/soc/rockchip/rockchip_pvtm.c index e8d5ddcf4192..846cc69c8ed5 100644 --- a/drivers/soc/rockchip/rockchip_pvtm.c +++ b/drivers/soc/rockchip/rockchip_pvtm.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -983,13 +984,13 @@ static int rockchip_pvtm_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct device_node *np = pdev->dev.of_node; struct device_node *node; - const struct of_device_id *match; + const struct rockchip_pvtm_data *data; struct rockchip_pvtm *pvtm; struct regmap *grf = NULL; void __iomem *base = NULL; - match = of_match_device(dev->driver->of_match_table, dev); - if (!match || !match->data) { + data = device_get_match_data(dev); + if (!data) { dev_err(dev, "missing pvtm data\n"); return -EINVAL; } @@ -1005,7 +1006,7 @@ static int rockchip_pvtm_probe(struct platform_device *pdev) } for_each_available_child_of_node(np, node) { - pvtm = rockchip_pvtm_init(dev, node, match->data, grf, base); + pvtm = rockchip_pvtm_init(dev, node, data, grf, base); if (!pvtm) { dev_err(dev, "failed to handle node %s\n", node->full_name);