Skip to contentSkip to conversation

serial: sh-sci: use of_property_read_bool()

PATCH In review Sergei Shtylyov 2 participants 2 messages Aug 13, 2017 – Aug 17, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 serial: sh-sci: use of_property_read_bool()

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

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

Reposting as the previous posting dropped Greg's and Jiri's emails...

 drivers/tty/serial/sh-sci.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/tty/serial/sh-sci.c +1 -2
Index: 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;
 }
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Sergei Shtylyov

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

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds