PM / devfreq: event: Use device_match_of_node()
authorye xingchen <ye.xingchen@zte.com.cn>
Fri, 25 Nov 2022 07:10:04 +0000 (15:10 +0800)
committerChanwoo Choi <cw00.choi@samsung.com>
Mon, 5 Dec 2022 12:57:18 +0000 (21:57 +0900)
Replace the open-code with device_match_of_node().

Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
drivers/devfreq/devfreq-event.c

index 6765c03..f041edc 100644 (file)
@@ -233,7 +233,7 @@ struct devfreq_event_dev *devfreq_event_get_edev_by_phandle(struct device *dev,
 
        mutex_lock(&devfreq_event_list_lock);
        list_for_each_entry(edev, &devfreq_event_list, node) {
-               if (edev->dev.parent && edev->dev.parent->of_node == node)
+               if (edev->dev.parent && device_match_of_node(edev->dev.parent, node))
                        goto out;
        }