lkml.org 
[lkml]   [2020]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH 5/5] gnss: change of_property_read to device_property_read
Date
change of_property_read_u32() for the current-speed property
to use the device_property_read_u32() this helps passing the
properties over a suitably populated struct property_entry.

Signed-off-by: Vaishnav M A <vaishnav@beagleboard.org>
---
drivers/gnss/serial.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gnss/serial.c b/drivers/gnss/serial.c
index def64b36d994..473faeea6aae 100644
--- a/drivers/gnss/serial.c
+++ b/drivers/gnss/serial.c
@@ -110,10 +110,9 @@ static int gnss_serial_set_power(struct gnss_serial *gserial,
static int gnss_serial_parse_dt(struct serdev_device *serdev)
{
struct gnss_serial *gserial = serdev_device_get_drvdata(serdev);
- struct device_node *node = serdev->dev.of_node;
u32 speed = 4800;

- of_property_read_u32(node, "current-speed", &speed);
+ device_property_read_u32(&serdev->dev, "current-speed", &speed);

gserial->speed = speed;

--
2.25.1
\
 
 \ /
  Last update: 2020-10-26 18:59    [W:0.061 / U:22.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site