[PATCH 1/3] HID: haptic: Replace create_singlethread_workqueue with alloc_ordered_workqueue
From: George Karagounis
Date: Wed Oct 28 2026 - 07:21:48 EST
create_singlethread_workqueue() is deprecated. Replace it with
alloc_ordered_workqueue() for the haptic workqueue. WQ_MEM_RECLAIM
is added to ensure hardware events can be processed under memory
pressure.
Signed-off-by: George Karagounis <mail@xxxxxxxxxx>
---
drivers/hid/hid-haptic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/hid-haptic.c b/drivers/hid/hid-haptic.c
index 8760eeb08b2c..2f4fcb56aba1 100644
--- a/drivers/hid/hid-haptic.c
+++ b/drivers/hid/hid-haptic.c
@@ -460,7 +460,7 @@ int hid_haptic_init(struct hid_device *hdev,
name = kmalloc(strlen(prefix) + strlen(hdev->name) + 2, GFP_KERNEL);
if (name) {
sprintf(name, "%s %s", prefix, hdev->name);
- haptic->wq = create_singlethread_workqueue(name);
+ haptic->wq = alloc_ordered_workqueue(name, WQ_MEM_RECLAIM);
kfree(name);
}
if (!haptic->wq) {
--
2.56.0