From patchwork Fri Nov 25 07:16:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ye.xingchen@zte.com.cn X-Patchwork-Id: 25863 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3823193wrr; Thu, 24 Nov 2022 23:19:08 -0800 (PST) X-Google-Smtp-Source: AA0mqf5fOL+UqdVvxHIzDnX7+hZjbnpjwRW7LxZrObBaVfehZzxIMKoppoFuZdLiMpZyWCesUEZW X-Received: by 2002:a17:906:b2c6:b0:78d:20f7:1294 with SMTP id cf6-20020a170906b2c600b0078d20f71294mr31846588ejb.442.1669360747859; Thu, 24 Nov 2022 23:19:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669360747; cv=none; d=google.com; s=arc-20160816; b=yCI4Kf1BnvDT9HS3hmyzXjjv5l6ZXOsXXD2n3TyTZvj/uuiMdGleSSoYtyhsOWseFz BnQWd5yFbSb/v26XnkxYoNLSbVqglJ4SNecsbcP0053SRk+Udd9Di3RPZiGS/IjkLlBv 4tuXhbnv1WHb064P73tpCNSlAHrasOKMwA3Ufr2kF552qB07vfnsrnVh+c4o3VWccYTN 6ShsNyaTBcEniN/h70rJqhSrrU68xd90gMpaO2b481jnLuBgEQAcv8AG2zKCoeA89CV/ y/80VkYvKVR//bKzwfrNotvUiLBbU41EmRNebgy6BexD/s3Jd2NBUj0Q5nUtt7mPFiNU hDew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:mime-version:message-id:date; bh=BocfKo7+1KVqTX9O2FnBA5uWw/6JObjOFHG7MZCw2XM=; b=TAIAzL+ttu0qIShNP7WtoXWXytUl7KvfpoyHJ+QDJAK0VqN4EXmgUbB454RcJ09AVN WAAxFUfrsHwIjz0NRm2xF1hqtsvptJ8PM1VVLd95EbMfYlsXgSpO57zv0FbEcatdYtpM +SE5H042+xWwO6Q2scPtICApE7DcSR4qrGGaew2Zp2vq8wgOQLZWTt4nQQeL/0VMiO4z Dsf7WtzDlS7lMw8Z9m+msDuGwonROYFUR74X2yi5zdJuRbwHUuxq9V2jpp/ys5OdGbi3 CReoIUUyPfOZgDyyR2jt7OPDRyX+M4DufxkCn+ajfaZ38BcSgWFWtRGDkMgq78Xo29tA 26cw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dm21-20020a170907949500b0078dc5b2b6c4si2981722ejc.666.2022.11.24.23.18.44; Thu, 24 Nov 2022 23:19:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229672AbiKYHQ4 (ORCPT + 99 others); Fri, 25 Nov 2022 02:16:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229784AbiKYHQm (ORCPT ); Fri, 25 Nov 2022 02:16:42 -0500 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DC8B2C65A; Thu, 24 Nov 2022 23:16:34 -0800 (PST) Received: from mse-fl2.zte.com.cn (unknown [10.5.228.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxhk.zte.com.cn (FangMail) with ESMTPS id 4NJR4J5rMyz8QrkZ; Fri, 25 Nov 2022 15:16:32 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.40.50]) by mse-fl2.zte.com.cn with SMTP id 2AP7GK8x056902; Fri, 25 Nov 2022 15:16:20 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp02[null]) by mapi (Zmail) with MAPI id mid31; Fri, 25 Nov 2022 15:16:22 +0800 (CST) Date: Fri, 25 Nov 2022 15:16:22 +0800 (CST) X-Zmail-TransId: 2afa63806bc67d756baa X-Mailer: Zmail v1.0 Message-ID: <202211251516222787845@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , Subject: =?utf-8?q?=5BPATCH=5D_PM_/_devfreq=3A_Use_device=5Fmatch=5Fof=5Fnod?= =?utf-8?q?e=28=29?= X-MAIL: mse-fl2.zte.com.cn 2AP7GK8x056902 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.250.137.novalocal with ID 63806BD0.000 by FangMail milter! X-FangMail-Envelope: 1669360592/4NJR4J5rMyz8QrkZ/63806BD0.000/10.5.228.133/[10.5.228.133]/mse-fl2.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 63806BD0.000/4NJR4J5rMyz8QrkZ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750451615226098343?= X-GMAIL-MSGID: =?utf-8?q?1750451615226098343?= From: ye xingchen Replace the open-code with device_match_of_node(). Signed-off-by: ye xingchen --- 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; }