usb: dwc2: Remove deprecated create_singlethread_workqueue
authorBhaktipriya Shridhar <bhaktipriya96@gmail.com>
Thu, 28 Jul 2016 08:27:29 +0000 (13:57 +0530)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Thu, 25 Aug 2016 09:13:09 +0000 (12:13 +0300)
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.

Acked-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc2/hcd.c

index 2df3d04d26f5687b9bb84499b0ec55648a0f45a0..df5a065780054f21841ca9f08b8ab118922c530b 100644 (file)
@@ -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;