[PATCH] USB: Remove dead code in usb_choose_configuration()

From: Jason Yan
Date: Thu May 07 2020 - 07:08:14 EST


This code is dead for more than 10 years. Remove it.

Signed-off-by: Jason Yan <yanaijie@xxxxxxxxxx>
---
drivers/usb/core/generic.c | 6 ------
1 file changed, 6 deletions(-)

diff --git a/drivers/usb/core/generic.c b/drivers/usb/core/generic.c
index 4626227a6dd2..1c93192fc136 100644
--- a/drivers/usb/core/generic.c
+++ b/drivers/usb/core/generic.c
@@ -93,12 +93,6 @@ int usb_choose_configuration(struct usb_device *udev)
* be reinstated when device firmwares become more reliable.
* Don't hold your breath.
*/
-#if 0
- /* Rule out self-powered configs for a bus-powered device */
- if (bus_powered && (c->desc.bmAttributes &
- USB_CONFIG_ATT_SELFPOWER))
- continue;
-#endif

/*
* The next test may not be as effective as it should be.
--
2.21.1