lkml.org 
[lkml]   [2019]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 08/11] PM / devfreq: rk3399_dmc: Replace the deprecated 'devfreq-events' property
Date
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@samsung.com>
---
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
\
 
 \ /
  Last update: 2019-12-20 01:19    [W:0.131 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site