Replace the deprecated 'devfreq-events' property with 'rockchip,dfi-device' property. But, to guarantee the backward-compatibility, keep the support of 'devfreq-events' property. Signed-off-by: Chanwoo Choi <cw00.choi@xxxxxxxxxxx> --- drivers/devfreq/rk3399_dmc.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/devfreq/rk3399_dmc.c b/drivers/devfreq/rk3399_dmc.c index e712c8662d2f..2294de13a3dc 100644 --- a/drivers/devfreq/rk3399_dmc.c +++ b/drivers/devfreq/rk3399_dmc.c @@ -306,11 +306,14 @@ static int of_get_ddr_timings(struct dram_timing *timing, static struct devfreq_event_dev *of_get_edev(struct device_node *np, int index) { - struct device_node *node = of_parse_phandle(np, "devfreq-events", + struct device_node *node = of_parse_phandle(np, "rockchip,dfi-device", index); - if (!node) - return ERR_PTR(-ENODEV); + if (!node) { + node = of_parse_phandle(np, "devfreq-events", index); + if (!node) + return ERR_PTR(-ENODEV); + } return devfreq_event_get_edev_by_node(node); } -- 2.17.1