Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Input: synaptics_i2c - guard polling restart in resume

synaptics_i2c_resume() restarts delayed work unconditionally, even when
the input device is not opened. Guard the polling restart by taking the
input device mutex and checking input_device_enabled() before re-queuing
the delayed work.

Fixes: eef3e4cab72ea ("Input: add driver for Synaptics I2C touchpad")
Signed-off-by: Minseong Kim <ii4gsp@gmail.com>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260121063738.799967-1-ii4gsp@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Minseong Kim and committed by
Dmitry Torokhov
870c2e7c 219be8d9

+5 -2
+5 -2
drivers/input/mouse/synaptics_i2c.c
··· 615 615 int ret; 616 616 struct i2c_client *client = to_i2c_client(dev); 617 617 struct synaptics_i2c *touch = i2c_get_clientdata(client); 618 + struct input_dev *input = touch->input; 618 619 619 620 ret = synaptics_i2c_reset_config(client); 620 621 if (ret) 621 622 return ret; 622 623 623 - mod_delayed_work(system_dfl_wq, &touch->dwork, 624 - msecs_to_jiffies(NO_DATA_SLEEP_MSECS)); 624 + guard(mutex)(&input->mutex); 625 + if (input_device_enabled(input)) 626 + mod_delayed_work(system_dfl_wq, &touch->dwork, 627 + msecs_to_jiffies(NO_DATA_SLEEP_MSECS)); 625 628 626 629 return 0; 627 630 }