From: Fabio Estevam <festevam@gmail.com>
To: dmitry.torokhov@gmail.com
Cc: linux-input@vger.kernel.org, marex@denx.de,
Fabio Estevam <festevam@gmail.com>
Subject: [PATCH] Input: mxs-lradc-ts - execute mxs_lradc_ts_stop() only once
Date: Tue, 16 Jun 2020 21:03:49 -0300 [thread overview]
Message-ID: <20200617000349.7429-1-festevam@gmail.com> (raw)
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
reply other threads:[~2020-06-17 0:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20200617000349.7429-1-festevam@gmail.com \
--to=festevam@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=marex@denx.de \
/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).