Skip to contentSkip to conversation

target: remove duplicate initialization

PATCH In review Dan Carpenter 2 participants 2 messages Oct 2, 2012

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

PATCH 1/2 target: remove duplicate initialization

We set bAlternateSetting to zero twice. I kept the second one (.bAlternateSetting = USB_G_ALT_INT_BBB) because that's more descriptive.

drivers/usb/gadget/tcm_usb_gadget.c +0 -1
index 0a83801..1ad4a69 100644
@@ -1956,7 +1956,6 @@ static void usbg_deregister_configfs(void)
 static struct usb_interface_descriptor bot_intf_desc = {
 	.bLength =              sizeof(bot_intf_desc),
 	.bDescriptorType =      USB_DT_INTERFACE,
-	.bAlternateSetting =	0,
 	.bNumEndpoints =        2,
 	.bAlternateSetting =	USB_G_ALT_INT_BBB,
 	.bInterfaceClass =      USB_CLASS_MASS_STORAGE,
#1 lore raw
Quoted 11 lines · Dan Carpenter

We set bAlternateSetting to zero twice. I kept the second one (.bAlternateSetting = USB_G_ALT_INT_BBB) because that's more descriptive.

drivers/usb/gadget/tcm_usb_gadget.c +0 -0
index 0a83801..1ad4a69 100644

drivers/usb/gadget/tcm_usb_gadget.c static void usbg_deregister_configfs(void)

Quoted 8 lines
drivers/usb/gadget/tcm_usb_gadget.c +0 -2
@@ -1956,7 +1956,6 @@ static void usbg_deregister_configfs(void)
 static struct usb_interface_descriptor bot_intf_desc = {
 	.bLength =              sizeof(bot_intf_desc),
 	.bDescriptorType =      USB_DT_INTERFACE,
-	.bAlternateSetting =	0,
 	.bNumEndpoints =        2,
 	.bAlternateSetting =	USB_G_ALT_INT_BBB,
 	.bInterfaceClass =      USB_CLASS_MASS_STORAGE,
--

Looks fine, applied to target-pending/for-next

Thanks Dan!

--nab