aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/ad7879.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2017-02-28 11:50:56 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2017-03-01 09:42:44 -0800
commit3a97c3d16b9e087a1741c527ecd8cbb4039d609f (patch)
treeeb2846f5a52cbcd426a2a5e2b6eaf7b1b992e55e /drivers/input/touchscreen/ad7879.c
parentInput: ad7879 - return plain error code from ad7879_probe() (diff)
downloadlinux-dev-3a97c3d16b9e087a1741c527ecd8cbb4039d609f.tar.xz
linux-dev-3a97c3d16b9e087a1741c527ecd8cbb4039d609f.zip
Input: ad7879 - try parsing properties on non-DT systems
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. Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/touchscreen/ad7879.c')
-rw-r--r--drivers/input/touchscreen/ad7879.c7
1 files 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);