serial: sh-sci: use of_property_read_bool()
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Sun, 13 Aug 2017 19:11:24 +0000 (22:11 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Aug 2017 18:51:20 +0000 (20:51 +0200)
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>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sh-sci.c

index e08b16b070c0fb914916dd6c2f78fcf3546edfea..784dd42002eadbeb98bb15c23c776ffa10b483ef 100644 (file)
@@ -3073,8 +3073,7 @@ static struct plat_sci_port *sci_parse_dt(struct platform_device *pdev,
        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;
 }