[PATCH] Input: mxs-lradc-ts - execute mxs_lradc_ts_stop() only once

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux