PM / devfreq: Use device_match_of_node()
PATCH 1/1 PM / devfreq: Use device_match_of_node()
From: ye xingchen <[email protected]>
Replace the open-code with device_match_of_node().
Signed-off-by ye xingchen <[email protected]>
--- drivers/devfreq/devfreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/devfreq/devfreq.c +1 -1
@@ -1057,7 +1057,7 @@ struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node)mutex_lock (&devfreq_list_lock);list_for_each_entry (devfreq, &devfreq_list, node) {if (devfreq->dev.parent - && devfreq->dev.parent->of_node == node) { + &&device_match_of_node (devfreq->dev.parent, node)) {mutex_unlock (&devfreq_list_lock);return devfreq; }
Signature · 1 line
2.25.1
Quoted 14 lines · On 22. 11. 25. 16:16, [email protected] wrote:
From: ye xingchen <[email protected]>
Replace the open-code with
device_match_of_node().Signed-off-by ye xingchen <[email protected]>--- drivers/devfreq/devfreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/devfreq/devfreq.c +0
-0
drivers/devfreq/devfreq.c struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node) · line 1063
Quoted 8 lines
drivers/devfreq/devfreq.c +1
-1@@ -1057,7 +1057,7 @@ struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node)mutex_lock (&devfreq_list_lock);list_for_each_entry (devfreq, &devfreq_list, node) {if (devfreq->dev.parent - && devfreq->dev.parent->of_node == node) { + &&device_match_of_node (devfreq->dev.parent, node)) {mutex_unlock (&devfreq_list_lock);return devfreq; }
Applied it.
Signature · 3 lines
Best Regards, Samsung Electronics Chanwoo Choi