Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

USB: gadget: udc: Remove some dead code

The 'drd_wq' workqueue_struct has never been used.
It is only destroyed, but never created.

It was introduced in commit 1b9f35adb0ff ("usb: gadget: udc: Add Synopsys
UDC Platform driver")

Remove the corresponding dead code and save some space from the 'udc'
structure.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/9a85b2353843b95e2d86acb3103967fd405a8536.1633865503.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Christophe JAILLET and committed by
Greg Kroah-Hartman
c326d3ed bedbac5f

-6
-1
drivers/usb/gadget/udc/amd5536udc.h
··· 572 572 struct extcon_specific_cable_nb extcon_nb; 573 573 struct notifier_block nb; 574 574 struct delayed_work drd_work; 575 - struct workqueue_struct *drd_wq; 576 575 u32 conn_type; 577 576 }; 578 577
-5
drivers/usb/gadget/udc/snps_udc_plat.c
··· 243 243 244 244 platform_set_drvdata(pdev, NULL); 245 245 246 - if (dev->drd_wq) { 247 - flush_workqueue(dev->drd_wq); 248 - destroy_workqueue(dev->drd_wq); 249 - } 250 - 251 246 phy_power_off(dev->udc_phy); 252 247 phy_exit(dev->udc_phy); 253 248 extcon_unregister_notifier(dev->edev, EXTCON_USB, &dev->nb);