Thread (6 messages) 6 messages, 2 authors, 3d ago

[PATCH 1/3] HID: haptic: Replace create_singlethread_workqueue with alloc_ordered_workqueue

flat view
WARM3d

From: George Karagounis <hidden>
Date: 2026-10-28 11:19:05
Also in: lkml
Subsystem: hid core layer, the rest · Maintainers: Jiri Kosina, Benjamin Tissoires, Linus Torvalds

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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help