[PATCH] Revert "HID: corsair: cancel LED work again after unregistering the LED"
From: Andreas Claesson via B4 Relay
Date: Tue Nov 24 2026 - 05:35:50 EST
From: Andreas Claesson <andreas@xxxxxxxxxxxxx>
This reverts commit e624a56578e551b77ee66eef74dc2efcd42deb08.
It added a cancel_work_sync() after led_classdev_unregister()
in k90_cleanup_backlight() and k90_cleanup_macro_functions(), because
unregistering the LED turns it off and that used to queue the work
again.
Commit cc8d022e8679 ("HID: corsair: use disable_work_sync() to tear down
the LED workers") was applied to the same branch and fixes the same
problem differently: the work is disabled before the LED is
unregistered, so the LED-off request can no longer queue it. The added
cancel_work_sync() calls therefore do nothing, and the comment above
them is no longer true.
No functional change.
Assisted-by: Claude:claude-mythos-5-2
Signed-off-by: Andreas Claesson <andreas@xxxxxxxxxxxxx>
---
drivers/hid/hid-corsair.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/hid/hid-corsair.c b/drivers/hid/hid-corsair.c
index a9f2a0447f2d..f966005d69dd 100644
--- a/drivers/hid/hid-corsair.c
+++ b/drivers/hid/hid-corsair.c
@@ -526,8 +526,6 @@ static void k90_cleanup_backlight(struct hid_device *dev)
drvdata->backlight->removed = true;
disable_work_sync(&drvdata->backlight->work);
led_classdev_unregister(&drvdata->backlight->cdev);
- /* unregister turns the LED off, which re-queues the work */
- cancel_work_sync(&drvdata->backlight->work);
kfree(drvdata->backlight->cdev.name);
kfree(drvdata->backlight);
}
@@ -544,8 +542,6 @@ static void k90_cleanup_macro_functions(struct hid_device *dev)
k90->record_led.removed = true;
disable_work_sync(&k90->record_led.work);
led_classdev_unregister(&k90->record_led.cdev);
- /* unregister turns the LED off, which re-queues the work */
- cancel_work_sync(&k90->record_led.work);
kfree(k90->record_led.cdev.name);
kfree(k90);
---
base-commit: 10bc1d627c297097cfdc099377f8a13efdfffd86
change-id: 20261124-hid-corsair-revert-redundant-cancel-8373b18be436
Best regards,
--
Andreas Claesson <andreas@xxxxxxxxxxxxx>