lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Mon,  7 Sep 2015 15:01:54 +0800
From:	Shawn Lin <shawn.lin@...k-chips.com>
To:	Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
	Shawn Lin <shawn.lin@...k-chips.com>
Subject: [PATCH] input: touchscreen: use of_property_read_bool()

Use more compact of_property_read_bool() calls instead of the
of_find_property() calls.

Signed-off-by: Shawn Lin <shawn.lin@...k-chips.com>
---

 drivers/input/touchscreen/mms114.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/input/touchscreen/mms114.c b/drivers/input/touchscreen/mms114.c
index 7cce876..66df77b 100644
--- a/drivers/input/touchscreen/mms114.c
+++ b/drivers/input/touchscreen/mms114.c
@@ -406,9 +406,9 @@ static struct mms114_platform_data *mms114_parse_dt(struct device *dev)
 	of_property_read_u32(np, "moving-threshold",
 				&pdata->moving_threshold);
 
-	if (of_find_property(np, "x-invert", NULL))
+	if (of_property_read_bool(np, "x-invert"))
 		pdata->x_invert = true;
-	if (of_find_property(np, "y-invert", NULL))
+	if (of_property_read_bool(np, "y-invert"))
 		pdata->y_invert = true;
 
 	return pdata;
-- 
2.3.7


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ