* [PATCH] Input: mxs-lradc-ts - execute mxs_lradc_ts_stop() only once
@ 2020-06-17 0:03 Fabio Estevam
0 siblings, 0 replies; only message in thread
From: Fabio Estevam @ 2020-06-17 0:03 UTC (permalink / raw)
To: dmitry.torokhov; +Cc: linux-input, marex, Fabio Estevam
Currently mxs_lradc_ts_stop() is unnecessarily executed several times
as it is placed inside a for loop.
Executing it only once is enough, so move it outside the for loop.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
drivers/input/touchscreen/mxs-lradc-ts.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/input/touchscreen/mxs-lradc-ts.c b/drivers/input/touchscreen/mxs-lradc-ts.c
index 9e36fee38d61..d42203b14335 100644
--- a/drivers/input/touchscreen/mxs-lradc-ts.c
+++ b/drivers/input/touchscreen/mxs-lradc-ts.c
@@ -669,6 +669,7 @@ static int mxs_lradc_ts_probe(struct platform_device *pdev)
return ret;
mxs_lradc_ts_hw_init(ts);
+ mxs_lradc_ts_stop(ts);
for (i = 0; i < 3; i++) {
irq = platform_get_irq_byname(pdev, mxs_lradc_ts_irq_names[i]);
@@ -677,8 +678,6 @@ static int mxs_lradc_ts_probe(struct platform_device *pdev)
virq = irq_of_parse_and_map(node, irq);
- mxs_lradc_ts_stop(ts);
-
ret = devm_request_irq(dev, virq,
mxs_lradc_ts_handle_irq,
0, mxs_lradc_ts_irq_names[i], ts);
--
2.17.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-06-17 0:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-17 0:03 [PATCH] Input: mxs-lradc-ts - execute mxs_lradc_ts_stop() only once Fabio Estevam
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).