From: Yang Li <yang.lee@linux.alibaba.com>
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 <yang.lee@linux.alibaba.com>
Subject: [PATCH -next] can: mscan: mpc5xxx: Use of_property_present() helper
Date: Tue, 21 Feb 2023 10:45:41 +0800 [thread overview]
Message-ID: <20230221024541.105199-1-yang.lee@linux.alibaba.com> (raw)
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 <yang.lee@linux.alibaba.com>
---
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,
--
2.20.1.7.g153144c
next reply other threads:[~2023-02-21 2:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-21 2:45 Yang Li [this message]
2023-02-21 4:35 ` [PATCH -next] can: mscan: mpc5xxx: Use of_property_present() helper Pavan Chebbi
2023-02-21 8:42 ` Marc Kleine-Budde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230221024541.105199-1-yang.lee@linux.alibaba.com \
--to=yang.lee@linux.alibaba.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=wg@grandegger.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).