Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1589836

[PATCH 3/4] Input: ad7879 - try parsing properties on non-DT systems

From Dmitry Torokhov <dmitry.torokhov@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 3/4] Input: ad7879 - try parsing properties on non-DT systems
Date 2017-02-28 23:20 +0100
Message-ID <tfYhH-21y-11@gated-at.bofh.it> (permalink)
References <tfYhH-21y-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


We have switched the driver to use generic device properties API, so there
is no need to check for presence of DT node before trying parse properties.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 drivers/input/touchscreen/ad7879.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/input/touchscreen/ad7879.c b/drivers/input/touchscreen/ad7879.c
index 7118f611e222..c415614ada68 100644
--- a/drivers/input/touchscreen/ad7879.c
+++ b/drivers/input/touchscreen/ad7879.c
@@ -560,11 +560,10 @@ int ad7879_probe(struct device *dev, struct regmap *regmap,
 		ts->averaging = pdata->averaging;
 		ts->pen_down_acc_interval = pdata->pen_down_acc_interval;
 		ts->median = pdata->median;
-	} else if (dev->of_node) {
-		ad7879_parse_dt(dev, ts);
 	} else {
-		dev_err(dev, "No platform data\n");
-		return -EINVAL;
+		err = ad7879_parse_dt(dev, ts);
+		if (err)
+			return err;
 	}
 
 	input_dev = devm_input_allocate_device(dev);
-- 
2.11.0.483.g087da7b7c-goog

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/4] Input: ad7879 - make sure we set up drvdata Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-02-28 23:20 +0100
  [PATCH 3/4] Input: ad7879 - try parsing properties on non-DT systems Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-02-28 23:20 +0100
  [PATCH 4/4] Input: ad7879 - do not manipulate capability bits directly Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-02-28 23:20 +0100
  [PATCH 2/4] Input: ad7879 - return plain error code from ad7879_probe() Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-02-28 23:20 +0100

csiph-web