[PATCH] serial: 8250_of: use of_property_read_bool()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@xxxxxxxxxxxxxxxxxx>

---
 drivers/tty/serial/8250/8250_of.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: tty/drivers/tty/serial/8250/8250_of.c
===================================================================
--- tty.orig/drivers/tty/serial/8250/8250_of.c
+++ tty/drivers/tty/serial/8250/8250_of.c
@@ -146,7 +146,7 @@ static int of_platform_serial_setup(stru
 	port->flags = UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF | UPF_IOREMAP
 		| 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->dev = &ofdev->dev;
@@ -192,7 +192,7 @@ static int of_platform_serial_probe(stru
 	if (!match)
 		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;
 
 	info = kzalloc(sizeof(*info), GFP_KERNEL);

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux