From: Sergei Shtylyov Date: Sun, 13 Aug 2017 19:11:24 +0000 (+0300) Subject: serial: sh-sci: use of_property_read_bool() X-Git-Tag: v5.15~10535^2~38 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=43c61286839761a5275c889364fc2588a756f197;p=platform%2Fkernel%2Flinux-starfive.git 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(). Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index e08b16b..784dd42 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -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; }