lkml.org 
[lkml]   [2015]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] input: touchscreen: use of_property_read_bool()
Date
Use more compact of_property_read_bool() calls instead of the
of_find_property() calls.

Signed-off-by: Shawn Lin <shawn.lin@rock-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



\
 
 \ /
  Last update: 2015-09-07 09:21    [W:0.025 / U:0.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site