[PATCH 2/5] Input: tsc2007 - remove unneeded memory barriers

From: Dmitry Torokhov

Date: Thu Nov 12 2026 - 01:58:37 EST


The driver invokes mb() after setting the stopped flag in tsc2007_stop()
and tsc2007_open(). These mandatory barriers lack pairing barriers on
the reader side and are unnecessary.

The wait queue operations wake_up() and wait_event_timeout(), along
with disable_irq() and enable_irq(), already provide the required
synchronization and memory ordering when stopping and starting the
touchscreen worker thread. Remove the redundant barriers.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
---
drivers/input/touchscreen/tsc2007_core.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/input/touchscreen/tsc2007_core.c b/drivers/input/touchscreen/tsc2007_core.c
index b3c4c0c9c42d..51e4d985afcc 100644
--- a/drivers/input/touchscreen/tsc2007_core.c
+++ b/drivers/input/touchscreen/tsc2007_core.c
@@ -171,7 +171,6 @@ static irqreturn_t tsc2007_soft_irq(int irq, void *handle)
static void tsc2007_stop(struct tsc2007 *ts)
{
ts->stopped = true;
- mb();
wake_up(&ts->wait);

if (ts->irq)
@@ -184,7 +183,6 @@ static int tsc2007_open(struct input_dev *input_dev)
int err;

ts->stopped = false;
- mb();

if (ts->irq)
enable_irq(ts->irq);
--
2.56.0.567.gdb80ae8cd5-goog