Skip to contentSkip to conversation

usb: dwc2: Remove deprecated create_singlethread_workqueue

PATCH In review Bhaktipriya Shridhar 3 participants 3 messages Jul 28, 2016 – Aug 2, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: dwc2: Remove deprecated create_singlethread_workqueue

alloc_ordered_workqueue replaces the deprecated
create_singlethread_workqueue.

There are multiple work items on the work queue, which require ordering. Hence, an ordered workqueue has been used.

The workqueue "wq_otg" is not being used on a memory reclaim path. Hence, WQ_MEM_RECLAIM has not been set.

---
 drivers/usb/dwc2/hcd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/dwc2/hcd.c +1 -1
index 2df3d04..df5a065 100644
@@ -5040,7 +5040,7 @@ int dwc2_hcd_init(struct dwc2_hsotg *hsotg, int irq)
 
 	/* Create new workqueue and init work */
 	retval = -ENOMEM;
-	hsotg->wq_otg = create_singlethread_workqueue("dwc2");
+	hsotg->wq_otg = alloc_ordered_workqueue("dwc2", 0);
 	if (!hsotg->wq_otg) {
 		dev_err(hsotg->dev, "Failed to create workqueue\n");
 		goto error2;

--
2.1.4

Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Bhaktipriya Shridhar

alloc_ordered_workqueue replaces the deprecated
create_singlethread_workqueue.

There are multiple work items on the work queue, which require ordering. Hence, an ordered workqueue has been used.

The workqueue "wq_otg" is not being used on a memory reclaim path. Hence, WQ_MEM_RECLAIM has not been set.

Thanks.

Signature · 1 line
tejun
Acked-by on v1 1/1
#2 lore raw
In reply to Bhaktipriya Shridhar

++ Felipe

Quoted 28 lines · Bhaktipriya Shridhar

alloc_ordered_workqueue replaces the deprecated
create_singlethread_workqueue.

There are multiple work items on the work queue, which require ordering. Hence, an ordered workqueue has been used.

The workqueue "wq_otg" is not being used on a memory reclaim path. Hence, WQ_MEM_RECLAIM has not been set.

---
 drivers/usb/dwc2/hcd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/dwc2/hcd.c +1 -2
index 2df3d04..df5a065 100644
@@ -5040,7 +5040,7 @@ int dwc2_hcd_init(struct dwc2_hsotg *hsotg, int irq)
 
 	/* Create new workqueue and init work */
 	retval = -ENOMEM;
-	hsotg->wq_otg = create_singlethread_workqueue("dwc2");
+	hsotg->wq_otg = alloc_ordered_workqueue("dwc2", 0);
 	if (!hsotg->wq_otg) {
 		dev_err(hsotg->dev, "Failed to create workqueue\n");
 		goto error2;
--
Quoted 3 lines

2.1.4

John