From patchwork Tue Feb 21 02:45:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 13147287 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4F06C61DA3 for ; Tue, 21 Feb 2023 02:45:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233173AbjBUCpt (ORCPT ); Mon, 20 Feb 2023 21:45:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233166AbjBUCps (ORCPT ); Mon, 20 Feb 2023 21:45:48 -0500 Received: from out30-101.freemail.mail.aliyun.com (out30-101.freemail.mail.aliyun.com [115.124.30.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B369206A3; Mon, 20 Feb 2023 18:45:46 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R231e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046056;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=10;SR=0;TI=SMTPD_---0Vc9zDCy_1676947542; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0Vc9zDCy_1676947542) by smtp.aliyun-inc.com; Tue, 21 Feb 2023 10:45:43 +0800 From: Yang Li To: kuba@kernel.org Cc: davem@davemloft.net, wg@grandegger.com, mkl@pengutronix.de, edumazet@google.com, pabeni@redhat.com, linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH -next] can: mscan: mpc5xxx: Use of_property_present() helper Date: Tue, 21 Feb 2023 10:45:41 +0800 Message-Id: <20230221024541.105199-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Use of_property_present() instead of of_get_property/of_find_property() in places where we just need to test presence of a property. Signed-off-by: Yang Li --- drivers/net/can/mscan/mpc5xxx_can.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/can/mscan/mpc5xxx_can.c b/drivers/net/can/mscan/mpc5xxx_can.c index b0ed798ae70f..8981c223181f 100644 --- a/drivers/net/can/mscan/mpc5xxx_can.c +++ b/drivers/net/can/mscan/mpc5xxx_can.c @@ -315,7 +315,7 @@ static int mpc5xxx_can_probe(struct platform_device *ofdev) priv->reg_base = base; dev->irq = irq; - clock_name = of_get_property(np, "fsl,mscan-clock-source", NULL); + clock_name = of_property_present(np, "fsl,mscan-clock-source"); priv->type = data->type; priv->can.clock.freq = data->get_clock(ofdev, clock_name,