aboutsummaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen
diff options
context:
space:
mode:
authorMukesh Ojha <mojha@codeaurora.org>2019-07-16 09:27:22 +0200
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2019-07-24 12:48:47 +0300
commit46bec7a918715d3b0e8d22e5e99d3245c1097c65 (patch)
treeeed340f86b0f494bd054ea0b09f4f73814713425 /drivers/input/touchscreen
parent9d41cbe23db0a3c51c0b28db987a6898f5d1255c (diff)
Input: mxs-lradc-ts - use devm_platform_ioremap_resource()
devm_platform_ioremap_resource() internally have platform_get_resource() and devm_ioremap_resource() in it. So instead of calling them separately use devm_platform_ioremap_resource() directly. Signed-off-by: Mukesh Ojha <mojha@codeaurora.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/touchscreen')
-rw-r--r--drivers/input/touchscreen/mxs-lradc-ts.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/input/touchscreen/mxs-lradc-ts.c b/drivers/input/touchscreen/mxs-lradc-ts.c
index 593b8d3e90b5..9e36fee38d61 100644
--- a/drivers/input/touchscreen/mxs-lradc-ts.c
+++ b/drivers/input/touchscreen/mxs-lradc-ts.c
@@ -606,7 +606,6 @@ static int mxs_lradc_ts_probe(struct platform_device *pdev)
struct device_node *node = dev->parent->of_node;
struct mxs_lradc *lradc = dev_get_drvdata(dev->parent);
struct mxs_lradc_ts *ts;
- struct resource *iores;
int ret, irq, virq, i;
u32 ts_wires = 0, adapt;
@@ -620,12 +619,9 @@ static int mxs_lradc_ts_probe(struct platform_device *pdev)
ts->dev = dev;
spin_lock_init(&ts->lock);
- iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!iores)
- return -EINVAL;
- ts->base = devm_ioremap(dev, iores->start, resource_size(iores));
- if (!ts->base)
- return -ENOMEM;
+ ts->base = devm_platform_ioremap_resource(pdev, 0);
+ if (IS_ERR(ts->base))
+ return PTR_ERR(ts->base);
ret = of_property_read_u32(node, "fsl,lradc-touchscreen-wires",
&ts_wires);