From ceda733d49b8e94f2e7eac9b74853e635749c320 Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Sun, 2 Aug 2026 17:52:03 -0700 Subject: [PATCH] Input: call handler->start() when uninhibiting device When an input device is inhibited via input_inhibit_device(), the driver is closed and physical feedback (like LEDs and sounds) is toggled off. However, from the input core's perspective, the handles remain open. When the device is later uninhibited, the driver is re-opened. While the core restores simple LED states via input_dev_toggle(), complex handlers (such as vt/keyboard) may need to re-synchronize their broader logical state with the hardware. Fixes: a181616487db ("Input: Add "inhibited" property") Assisted-by: Antigravity:gemini-3.5-flash Link: https://patch.msgid.link/20260803005210.1251102-3-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov --- drivers/input/input.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/input/input.c b/drivers/input/input.c index e4f8c2067b84..47886a394c6b 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -1806,6 +1806,7 @@ static int input_inhibit_device(struct input_dev *dev) static int input_uninhibit_device(struct input_dev *dev) { + struct input_handle *handle; int error; guard(mutex)(&dev->mutex); @@ -1833,6 +1834,11 @@ static int input_uninhibit_device(struct input_dev *dev) if (dev->users && dev->poller) input_dev_poller_start(dev->poller); + list_for_each_entry(handle, &dev->h_list, d_node) { + if (handle->open && handle->handler->start) + handle->handler->start(handle); + } + return 0; }