]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Input: zforce_ts - ensure that pm_stay_awake() and pm_relax() are balanced
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 24 Aug 2024 05:50:31 +0000 (22:50 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 6 Sep 2024 05:56:45 +0000 (22:56 -0700)
commit9ba33f6145728c09c8e4578ffa8e94aef47b4e68
treea9f5957cfca3b68a78afa7aec38f4e29811ed01a
parentf388412f707e98735e44341447263ab3e25e7043
Input: zforce_ts - ensure that pm_stay_awake() and pm_relax() are balanced

There is a small chance that ts->suspending flag may change while the
interrupt handler is running. To make sure call to pm_relax() is not
skipped on accident use a temporary to hold the original value at the
beginning of interrupt. Use READ_ONCE() so that the value is actually
fetched at the right time.

Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD
Link: https://lore.kernel.org/r/20240824055047.1706392-8-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/zforce_ts.c