summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen/ts4800-ts.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2016-07-26 10:26:29 +0300
committerDave Airlie <airlied@redhat.com>2016-07-26 10:26:29 +0300
commit5e580523d9128a4d8364fe89d36c38fc7819c8dd (patch)
tree852fb2427d980830ae8686a91e4ca5873f259ab9 /drivers/input/touchscreen/ts4800-ts.c
parentc11dea5b0290984fa48111957ba3fdc5b3bdae5a (diff)
parent523d939ef98fd712632d93a5a2b588e477a7565e (diff)
downloadlinux-5e580523d9128a4d8364fe89d36c38fc7819c8dd.tar.xz
Backmerge tag 'v4.7' into drm-next
Linux 4.7 As requested by Daniel Vetter as the conflicts were getting messy.
Diffstat (limited to 'drivers/input/touchscreen/ts4800-ts.c')
-rw-r--r--drivers/input/touchscreen/ts4800-ts.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/input/touchscreen/ts4800-ts.c b/drivers/input/touchscreen/ts4800-ts.c
index 3c3dd78303be..fed73eeb47b3 100644
--- a/drivers/input/touchscreen/ts4800-ts.c
+++ b/drivers/input/touchscreen/ts4800-ts.c
@@ -118,6 +118,13 @@ static int ts4800_parse_dt(struct platform_device *pdev,
return -ENODEV;
}
+ ts->regmap = syscon_node_to_regmap(syscon_np);
+ of_node_put(syscon_np);
+ if (IS_ERR(ts->regmap)) {
+ dev_err(dev, "cannot get parent's regmap\n");
+ return PTR_ERR(ts->regmap);
+ }
+
error = of_property_read_u32_index(np, "syscon", 1, &reg);
if (error < 0) {
dev_err(dev, "no offset in syscon\n");
@@ -134,12 +141,6 @@ static int ts4800_parse_dt(struct platform_device *pdev,
ts->bit = BIT(bit);
- ts->regmap = syscon_node_to_regmap(syscon_np);
- if (IS_ERR(ts->regmap)) {
- dev_err(dev, "cannot get parent's regmap\n");
- return PTR_ERR(ts->regmap);
- }
-
return 0;
}