Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5c98e9cd authored by Sergei Shtylyov's avatar Sergei Shtylyov Committed by Greg Kroah-Hartman
Browse files

serial: 8250_of: use of_property_read_bool()



Use slightly more compact of_property_read_bool() calls for the boolean
properties instead of of_find_property() calls.

Signed-off-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6e0a5de2
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -146,7 +146,7 @@ static int of_platform_serial_setup(struct platform_device *ofdev,
	port->flags = UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF | UPF_IOREMAP
	port->flags = UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF | UPF_IOREMAP
		| UPF_FIXED_PORT | UPF_FIXED_TYPE;
		| UPF_FIXED_PORT | UPF_FIXED_TYPE;


	if (of_find_property(np, "no-loopback-test", NULL))
	if (of_property_read_bool(np, "no-loopback-test"))
		port->flags |= UPF_SKIP_TEST;
		port->flags |= UPF_SKIP_TEST;


	port->dev = &ofdev->dev;
	port->dev = &ofdev->dev;
@@ -192,7 +192,7 @@ static int of_platform_serial_probe(struct platform_device *ofdev)
	if (!match)
	if (!match)
		return -EINVAL;
		return -EINVAL;


	if (of_find_property(ofdev->dev.of_node, "used-by-rtas", NULL))
	if (of_property_read_bool(ofdev->dev.of_node, "used-by-rtas"))
		return -EBUSY;
		return -EBUSY;


	info = kzalloc(sizeof(*info), GFP_KERNEL);
	info = kzalloc(sizeof(*info), GFP_KERNEL);