* [PATCH] PM / devfreq: Use device_match_of_node()
@ 2022-11-25 7:16 ye.xingchen
2022-12-02 23:05 ` Chanwoo Choi
0 siblings, 1 reply; 2+ messages in thread
From: ye.xingchen @ 2022-11-25 7:16 UTC (permalink / raw)
To: cw00.choi; +Cc: myungjoo.ham, kyungmin.park, linux-pm, linux-kernel
From: ye xingchen <ye.xingchen@zte.com.cn>
Replace the open-code with device_match_of_node().
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
drivers/devfreq/devfreq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index 8c5f6f7fca11..817c71da391a 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -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;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] PM / devfreq: Use device_match_of_node()
2022-11-25 7:16 [PATCH] PM / devfreq: Use device_match_of_node() ye.xingchen
@ 2022-12-02 23:05 ` Chanwoo Choi
0 siblings, 0 replies; 2+ messages in thread
From: Chanwoo Choi @ 2022-12-02 23:05 UTC (permalink / raw)
To: ye.xingchen, cw00.choi
Cc: myungjoo.ham, kyungmin.park, linux-pm, linux-kernel
On 22. 11. 25. 16:16, ye.xingchen@zte.com.cn wrote:
> From: ye xingchen <ye.xingchen@zte.com.cn>
>
> Replace the open-code with device_match_of_node().
>
> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
> ---
> drivers/devfreq/devfreq.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
> index 8c5f6f7fca11..817c71da391a 100644
> --- a/drivers/devfreq/devfreq.c
> +++ b/drivers/devfreq/devfreq.c
> @@ -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.
--
Best Regards,
Samsung Electronics
Chanwoo Choi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-12-02 23:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-25 7:16 [PATCH] PM / devfreq: Use device_match_of_node() ye.xingchen
2022-12-02 23:05 ` Chanwoo Choi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox