On 08/29/2012 10:58 PM, Michal Nazarewicz wrote:
@@ -1625,8 +1612,6 @@ int usb_composite_probe(struct usb_composite_driver *driver)if (!driver->name) driver->name = "composite"; - if (!driver->iProduct) - driver->iProduct = driver->name;This leaves gadgets that do not provide name explicitly with no product name, doesn't it? At the moment, if gadget does not provide any product string, the name given in usb_composite_driver is used. If even that is not provided, "composite" is assumed. As far as I can tell, this change removes that functionality.USB_GADGET_PRODUCT_IDX
$ git grep USB_GADGET_COMPOSITE_OPTIONS | sed 's/:.*//' | sort > compo $ git grep USB_GADGET_PRODUCT_IDX].s | sed 's/:.*//' | sort > have $ diff -u compo have --- compo 2012-08-30 09:05:05.084992590 +0200 +++ have 2012-08-30 09:07:38.786684500 +0200 @@ -1,6 +1,7 @@ drivers/usb/gadget/acm_ms.c drivers/usb/gadget/audio.c drivers/usb/gadget/cdc2.c +drivers/usb/gadget/composite.c drivers/usb/gadget/ether.c drivers/usb/gadget/g_ffs.c drivers/usb/gadget/gmidi.c @@ -14,4 +15,3 @@ drivers/usb/gadget/tcm_usb_gadget.c drivers/usb/gadget/webcam.c drivers/usb/gadget/zero.c -include/linux/usb/composite.h That means _all_ gadgets provide a product strings. If you look at .s than you notice that none of them is set to "". That makes driver->iProduct not required. Only g_ffs, g_multi and g_mass_storage used this field and here I forgot to initialize desc.id while I moved the entry to the string array.
driver->gadget_driver = composite_driver_template; gadget_driver =&driver->gadget_driver;
Sebastian -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
