Skip to content

Commit

Permalink
serial: sh-sci: use of_property_read_bool()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sergei Shtylyov authored and Greg Kroah-Hartman committed Aug 28, 2017
1 parent ee1c90c commit 43c6128
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/tty/serial/sh-sci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 43c6128

Please sign in to comment.