linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Michael Hennerich <michael.hennerich@analog.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/4] Input: ad7879 - try parsing properties on non-DT systems
Date: Tue, 28 Feb 2017 14:08:47 -0800	[thread overview]
Message-ID: <20170228220848.31185-3-dmitry.torokhov@gmail.com> (raw)
In-Reply-To: <20170228220848.31185-1-dmitry.torokhov@gmail.com>

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

  parent reply	other threads:[~2017-02-28 22:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-28 22:08 [PATCH 1/4] Input: ad7879 - make sure we set up drvdata Dmitry Torokhov
2017-02-28 22:08 ` [PATCH 2/4] Input: ad7879 - return plain error code from ad7879_probe() Dmitry Torokhov
2017-03-01  7:40   ` Michael Hennerich
2017-02-28 22:08 ` Dmitry Torokhov [this message]
2017-03-01  7:38   ` [PATCH 3/4] Input: ad7879 - try parsing properties on non-DT systems Michael Hennerich
2017-02-28 22:08 ` [PATCH 4/4] Input: ad7879 - do not manipulate capability bits directly Dmitry Torokhov
2017-03-01  7:37   ` Michael Hennerich
2017-03-01  7:40 ` [PATCH 1/4] Input: ad7879 - make sure we set up drvdata Michael Hennerich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170228220848.31185-3-dmitry.torokhov@gmail.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.hennerich@analog.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).