lkml.org 
[lkml]   [2023]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH -next] can: mscan: mpc5xxx: Use of_property_present() helper
Date
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
\
 
 \ /
  Last update: 2023-03-27 00:29    [W:0.065 / U:0.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site