linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] serial: sh-sci: use of_property_read_bool()
@ 2017-08-13 19:07 Sergei Shtylyov
  0 siblings, 0 replies; only message in thread
From: Sergei Shtylyov @ 2017-08-13 19:07 UTC (permalink / raw)
  To: "open list:SERIAL DRIVERS"
  Cc: linux-renesas-soc, linux-sh, Sergei Shtylyov

[-- Attachment #1: serial-sh-sci-use-of_property_read_bool.patch --]
[-- Type: text/plain, Size: 852 bytes --]

Use more compact of_property_read_bool() call for a boolean property
instead  of of_find_property() call in sci_parse_dt().

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
This patch is against the 'tty-next' branch of GregKH's 'tty.git' repo.

 drivers/tty/serial/sh-sci.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Index: tty/drivers/tty/serial/sh-sci.c
===================================================================
--- tty.orig/drivers/tty/serial/sh-sci.c
+++ tty/drivers/tty/serial/sh-sci.c
@@ -3073,8 +3073,7 @@ static struct plat_sci_port *sci_parse_d
 	p->type = SCI_OF_TYPE(match->data);
 	p->regtype = SCI_OF_REGTYPE(match->data);
 
-	if (of_find_property(np, "uart-has-rtscts", NULL))
-		sp->has_rtscts = true;
+	sp->has_rtscts = of_property_read_bool(np, "uart-has-rtscts");
 
 	return p;
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-08-13 19:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-13 19:07 [PATCH] serial: sh-sci: use of_property_read_bool() Sergei Shtylyov

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).